This is a simple skeleton project fork from akrabat/slim3-skeleton that includes scaffold tool, migrations,auth,Twig, Flash messages, eloquent ORM and Monolog.
$ composer create-project -n -s dev mrcoco/slim3-eloquent-skeleton my-app
$ cd my-app
- Change database setting
app\setting.php
$ vendor/davedevelopment/phpmig/bin/phpmig migrate
$ php -S 0.0.0.0:8888 -t public public/index.php
- Browse to http://localhost:8888
app
: Application codeapp/src
: All class files within theApp
namespaceapp/templates
: Twig template filescache/twig
: Twig's Autocreated cache fileslog
: Log filespublic
: Webserver rootvendor
: Composer dependencies
public/index.php
: Entry point to applicationapp/settings.php
: Configurationapp/dependencies.php
: Services for Pimpleapp/middleware.php
: Application middlewareapp/routes.php
: All application routes are hereapp/src/Action/HomeAction.php
: Action class for the home pageapp/templates/home.twig
: Twig template file for the home page
- Currently there are 3 supported commands:
php cli.php create:action MyActionClassName
php cli.php create:middleware MyMiddlewareClassName
php cli.php create:model MyModelClassName
php cli.php create:scaffold MyModuleName
-
migrate all data
-
php cli.php migrate
-
Confirmation of status
-
php cli.php status
-
Creating // migration file
-
php cli.php generate [MigrationName]
-
//Execution of migration
-
php cli.php migration
-
// I one Back
-
php cli.php rollback
-
// Return all
-
php cli.php rollback -t 0
-
// Go back to the time of completion of the specified MigrationID
-
php cli.php rollback -t [MigrationID]
-
// Only specified MigrationID the migration / roll back
-
php cli.php [up | down] [MigrationID]
admin
username:[email protected]
password:password
moderator
username:[email protected]
password:password
user
username:[email protected]
password:password