This is a simple skeleton project for Slim 3 with base Bootstrap style that includes Twig, Flash messages, fully operational Signup/Signin with Mail Validation, base Users administration and track of users activity.
$ composer create-project --no-interaction --stability=dev loukovits/slim3-skeleton [my-app]
Where [my-app] the path you want to install it.
-
Go to [my-app]/app/config
-
Change the db.php and put your database information.
-
Change the mail.php and put your mail information.
-
$cd [my-app]
-
vendor/bin/phinx init
-
Change the [my-app]/phinx.yml as below:
paths: migrations: %%PHINX_CONFIG_DIR%%/app/Services/db/migrations seeds: %%PHINX_CONFIG_DIR%%/app/Services/db/seeds environments: default_migration_table: phinxlog default_database: development production: adapter: mysql host: localhost name: production_db user: root pass: '' port: 3306 charset: utf8 development: adapter: mysql host: localhost name: your_db user: your_db_user pass: 'your_db_password' port: 3306 charset: utf8 testing: adapter: mysql host: localhost name: testing_db user: root pass: '' port: 3306 charset: utf8
-
vendor/bin/phinx migrate -e development
-
Go into your database and at the users table add to user admin your email.
-
Login as Admin with your email and password
admin
.
app
: Application codeapp/config
: The configuration files for your database and your mailapp/Services
: The PHPMailr and the Migrations filesapp/Validation
: All Validators filesresources/views
: All Twig's template filespublic
: Webserver rootvendor
: Composer dependencies
auth/signup
auth/signin
auth/password/change
auth/signout
admin/users
{
"require": {
"slim/slim": "^3.0",
"slim/twig-view": "^2.1",
"illuminate/database": "^5.3",
"respect/validation": "^1.1",
"slim/csrf": "^0.7.0",
"slim/flash": "^0.1.0",
"hassankhan/config": "^0.10.0",
"phpmailer/phpmailer": "^5.2",
"robmorgan/phinx": "^0.6.5"
},
"autoload": {
"psr-4": {
"App\\": "app"
}
}
}