satmaxt/slim-boilerplate

Slim framework boilerplate with MVC mode

4.3.0 2019-11-27 02:40 UTC

This package is auto-updated.

Last update: 2024-04-27 11:53:26 UTC


README

A slim framework boilerplate with MVC, ready to use for your project

Features

  1. Slim v4
  2. PHP-DI Container
  3. Eloquent ORM
  4. MVC
  5. Symfony Var Dumper
  6. Dynamic Basepath

Quick Installation

composer create-project --prefer-dist satmaxt/slim-boilerplate stdev

Change stdev to your project name

Install Dependency

composer install

Configure Database Connection

Open file configs/database.php

return [
    'driver'    => 'mysql',
    'host'      => 'localhost',
    'database'  => 'yourdbname',
    'username'  => 'yourdbusername',
    'password'  => 'yourdbpassword',
    'charset'   => 'utf8',
    'collation' => 'utf8_unicode_ci',
    'prefix'    => '',
];

and change it with your database information

Deployment

Open file bootstrap/app.php and find this line:

$app->addErrorMiddleware(true, true, true);

change the first argument to false and save it.

Install Dependency

composer install --optimize-autoloader --no-dev

License

This bolerplate is licensed under the MIT license. See License File for more information.

Copyright © 2019. Satria Aji Putra