{"id":18411439,"url":"https://github.com/sirodiaz/sglim","last_synced_at":"2025-06-23T17:34:12.364Z","repository":{"id":57048525,"uuid":"54431067","full_name":"SiroDiaz/Sglim","owner":"SiroDiaz","description":"A Slim 3 MVC skeleton","archived":false,"fork":false,"pushed_at":"2016-04-11T22:48:34.000Z","size":34,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T22:55:38.059Z","etag":null,"topics":["mvc","pdo","skeleton","slim","twig"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/SiroDiaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-03-21T23:47:10.000Z","updated_at":"2017-05-26T02:56:07.000Z","dependencies_parsed_at":"2022-08-23T19:10:13.017Z","dependency_job_id":null,"html_url":"https://github.com/SiroDiaz/Sglim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiroDiaz%2FSglim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiroDiaz%2FSglim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiroDiaz%2FSglim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/SiroDiaz%2FSglim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/SiroDiaz","download_url":"https://codeload.github.com/SiroDiaz/Sglim/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248643050,"owners_count":21138353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mvc","pdo","skeleton","slim","twig"],"created_at":"2024-11-06T03:37:02.283Z","updated_at":"2025-04-12T22:55:41.239Z","avatar_url":"https://github.com/SiroDiaz.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Sglim\nA Slim 3 MVC skeleton.\nIt uses PDO for the model layer and Twig for the view layer. Also it depends of hassankhan/config\nlibrary for load config files and the symfony/console package for the Sglim command line tool.\nSglim can be extended adding few neccesary packages because Sglim goal is keep simple the Slim\nconfiguration.\n\n## Why Sglim?\n\nThere are many Slim framework skeletons but i don't see neither that like me. So i have decided to\nbuild my own \"MVC\" skeleton for small/medium APIs and dynamic websites when you need speed and low complexity\nin your apps.\n\n## Install\n\nAll you need to install Sglim is Composer. Run the following command.\n\n``` bash\n$ composer create-project \"sglim/sglim\":\"dev-master\" app-name\n```\n\n## Run the application\n\nGo into the public folder inside the project folder and then \n``` bash\n$ cd app-name/public\n# run the server\n$ php -S 0.0.0.0:8000\n```\n\n## Folders structure\n\nSglim uses different folders to organize your project based in other frameworks structure.\n\n- **App**, where is hosted main application folders as *Models*, *Views*, *Routes*, *Api* and Middlewares.\n- **config**, where you can find two configuration files: *config_development* and *config_production*. Both cantains database and Slim configuration and you can also set your Facebook, Twitter and other app secret keys.\n- **public**. The folder where are all application frontend files.\n- **storage**. Storage contains all rendered all Twig views(cache) and log files.\n\n## Command line\n\nSglim allows you many shortcuts to make things fast. Right now there are 3 main commands:\n\n**Generate a new route file** if the route doesn't exist.\n\n``` bash\n$ php sglim make:route route-name\n```\n\n**Generate a new model**\n\n``` bash\n$ php sglim make:model model-name\n```\n\n**Generate a new view** HTML5 file\n\n``` bash\n$ php sglim make:view view-name\n```\n\n## FAQ / Contact\n\n**Question 1**: Can i use an ORM instead of PDO extension?\n*Yes, you can. I tried using Eloquent(Lavel ORM) and i had to do minor changes in the index.php file.\nOnly i had to add a charset option in the configuration file but it works properly. It is pretty simple\nand if you love ORMs you can mix Sglim with the ORM that you want.*\n\n**Question 2**: Why doesn't Sglim include all Slim package like [Slim-Csrf](https://github.com/slimphp/Slim-Csrf)?\n*Because the Sglim idea is to keep it simple. But maybe in future commits i will set them to Sglim package*\n\nYou can contact with me through Twitter([@Siro_Diaz](https://twitter.com/siro_diaz)) or email me \u0026lt;siro_diaz@yahoo.com\u0026gt;","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirodiaz%2Fsglim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsirodiaz%2Fsglim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsirodiaz%2Fsglim/lists"}