{"id":17169058,"url":"https://github.com/vikkio88/slime","last_synced_at":"2025-04-13T16:04:11.564Z","repository":{"id":57077991,"uuid":"45401837","full_name":"vikkio88/slime","owner":"vikkio88","description":"A small api framework with Slim v3 +Eloquent, to create easily Restful services","archived":false,"fork":false,"pushed_at":"2017-03-24T21:08:46.000Z","size":78,"stargazers_count":6,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T06:51:22.223Z","etag":null,"topics":["api","cli","eloquent","framework","lumen-alternative","micro-framework","migrations","php-rest-api","rest-api","restful","slim3"],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/vikkio88.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-11-02T15:07:53.000Z","updated_at":"2024-04-02T12:35:05.000Z","dependencies_parsed_at":"2022-08-24T13:00:25.901Z","dependency_job_id":null,"html_url":"https://github.com/vikkio88/slime","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikkio88%2Fslime","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikkio88%2Fslime/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikkio88%2Fslime/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/vikkio88%2Fslime/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/vikkio88","download_url":"https://codeload.github.com/vikkio88/slime/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741202,"owners_count":21154253,"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":["api","cli","eloquent","framework","lumen-alternative","micro-framework","migrations","php-rest-api","rest-api","restful","slim3"],"created_at":"2024-10-14T23:24:50.377Z","updated_at":"2025-04-13T16:04:11.530Z","avatar_url":"https://github.com/vikkio88.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Slime (SLIM + Eloquent)\n[![Build Status](https://travis-ci.org/vikkio88/slime.svg?branch=master)](https://travis-ci.org/vikkio88/slime) [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/vikkio88/slime/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/vikkio88/slime/?branch=master) [![Code Climate](https://codeclimate.com/github/vikkio88/slime/badges/gpa.svg)](https://codeclimate.com/github/vikkio88/slime) [![Test Coverage](https://codeclimate.com/github/vikkio88/slime/badges/coverage.svg)](https://codeclimate.com/github/vikkio88/slime/coverage) [![Issue Count](https://codeclimate.com/github/vikkio88/slime/badges/issue_count.svg)](https://codeclimate.com/github/vikkio88/slime) \n\nLaravel is as heavy as a pregnant morbidly obese hippo and full of things that you would never use but you like eloquent models?\n\nWell use **slime-api** for fuck sake.\n\nBasically a boilerplate to create quickly RestFulAPI.\n\n### Ingredients\n\n**Aqua, Eloquent (from Laravel), Slim (v3), Some other bullshit**\n\n**Beware, it might contain nuts**\n\n# HowTo\nFirst clone the project\n```\ngit clone git@github.com:vikkio88/slime.git\n```\nor install with composer\n```\ncomposer create-project vikkio88/slime-api WHATEVER\n```\n\nInstall the dependencies (not needed if you used ```create-project``` command above)\n```\ncomposer install\n```\n\nMove and edit the configuration from the file ```.env.example``` to the file ```.env```\n\nRun the migrations and seeders\n```\nphp novice migrate \u0026\u0026 php novice seeder\n```\nRun the tests\n```\nphpunit\n```\n\n# Novice\n```novice``` is a php cli script taken from another [project](https://github.com/kladd/slim-eloquent).\nIn this small project I extended it to make it easier for everyone to generate classes and even generate their own commands.\n## How to\n**Novice** will run a script which is in the right place, if it extends the right Interface.\nThe file ```config/console``` contains the path where novice will search for the scripts\n```php\nreturn [\n    'commandPaths' =\u003e [\n        'App\\Lib\\Slime\\Console\\Commands\\\\',\n        'App\\Console\\\\'\n    ]\n];\n```\nIf you need more, just add more (dont forget to add them to the composer json autoloader config)\n\n## Usage\nTo run a ```novice``` command you will need to be in the root of the project and type\n```\n$ php novice \u003ccommand_name\u003e\n```\n\n### Command Bundled\nOut of the box **Slime** provide you the following *novice* commands:\n```\ncreate_config \u003cname\u003e\ncreate_migration \u003cname\u003e\ncreate_model \u003cname\u003e (namespaces availabile)\ncreate_action \u003cname\u003e (namespaces availabile)\ncreate_seeder \u003cname\u003e\ncreate_route \u003cname\u003e\nmigrate\nseed\nbuild\n```\nwhich code can be found on ```App\\Lib\\Slime\\Console\\Commands```\n \n and \n ```\n coverage [percentage]\n echo [parameter1] [parameter2] ...\n ```\n which code can be found on ```App\\Console```\n#### Build Command\nRunning the command ```php novice build``` you will generate a lighter version of your api project (easier to deploy via ftp) in the ```dist/``` folder.\n```\nphp novice build\n```\nWill generate the deployable version, if you want it to be execute with verbose output just add **-v**\n```\nphp novice build clean\n```\nwill clean the ```dist/``` folder.\n\nThere is one configuration file that will allow you to customize your build ```config/build.php```\nYou can add to this file the folders and the files you want the build script to copy over, and if you want to exclude more files on the vendor clean process.\n\n#### Namespaced Generator Commands\n```\nphp novice create_model users\\\\player\n```\nWill generate a Model inside the right folder, creating the namespace structure (psr4 standard) and the namespace string on the file head.\nthe command above will generate ```Models/Users/Player.php``` file and the class will be in the namespace ```App\\Models\\Users```.\n\n```\nphp novice create_action users\\\\player_get_one\n```\nWill generate an Action inside the right folder, creating the namespace structure (psr4 standard) and the namespace string on the file head.\nthe command above will generate ```Actions/Users/PlayerGetOne.php``` file and the class will be in the namespace ```App\\Actions\\Users```.\n\nAll the Generator commands convert snake_case into UpperCamelCase, so if you type\n```\nphp novice create_model users\\\\player_match\n```\nthe command above will generate ```Models/Users/PlayerMatch.php``` file and the class will be in the namespace ```App\\Models\\Users```.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikkio88%2Fslime","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fvikkio88%2Fslime","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fvikkio88%2Fslime/lists"}