choirulafandi/slim-skeleton

A Slim Framework skeleton application for development

Installs: 54

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 3

Forks: 0

Open Issues: 0

Language:HTML

Type:project

dev-master 2017-10-29 05:47 UTC

This package is not auto-updated.

Last update: 2024-03-16 16:30:51 UTC


README

Requirements

  • PHP 7.0 or newer.
  • HTTP Server, Apache.
  • MySQL Server 5.x or newer.

Using

Installation

  1. Create Project
$ composer create-project -n -s dev choirulafandi/slim-skeleton my-app
  1. Init phinx migration and edit migrations config at phinx.yml file
$ php vendor/bin/phinx init
  1. Open .env in project root dan setting your environment
$ cp .env.example .env
  1. chmod folder logs
$ sudo chmod -R 777 logs
  1. use PHP built in server dan pointing to folder public as docroot.
$ php -S  localhost:8080 -t public/
  1. Browse to http://localhost:8080

Key Directory

  • app: Application code
  • app/src: All class files within the App namespace
  • db: Database migration and seeding
  • logs: Log files
  • template: Twig template files
  • public: Webserver root
  • vendor: Composer dependencies

Key files

  • public/index.php: Entry point to application
  • app/settings.php: Configuration
  • app/dependencies.php: Services for Pimple
  • app/middleware.php: Application middleware
  • app/routes.php: All application routes are here
  • app/database.php: Setting database eloquent