Download the PHP package xsanisty/slim-starter without Composer
On this page you can find all versions of the php package xsanisty/slim-starter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package slim-starter
SlimStarter
SlimStarter is a bootstrap application built with Slim Framework in MVC architecture, with Laravel's Eloquent as database provider (Model) and Twig as template engine (View).
Additional package is Sentry as authentication provider and Slim-facade which provide easy access to underlying Slim API with static interface like Laravel syntax (built based on Laravel's Facade).
Showcase
You can test SlimStarter in live site by visiting here : (shared hosting) http://slimstarter.xsanisty.com (pagodabox) http://slimstarter.gopagoda.com
with username and password .
Installation
You can now install SlimStarter on pagodabox via App Cafe https://pagodabox.com/cafe/ikhsan017/slimstarter
1 Manual Install
You can manually install SlimStarter by cloning this repo or download the zip file from this repo, and run .
2 Install via
Alternatively, you can use to install SlimStarter without downloading zip or cloning this repo.
3 Setup Permission
After composer finished install the dependencies, you need to change file and folder permission.
4 Configure and Setup Database
You can now access the installer by pointing install.php in your browser
Configuration
Configuration file of SlimStarter located in , edit the database.php, cookie.php and other to match your need
Routing
Routing configuration is located in , it use Route facade to access underlying Slim router. If you prefer the 'Slim' way, you can use $app to access Slim instance
Route to closure
Route to controller method
Route Middleware
Route group
Route Resource this will have same effect on route group above like Laravel Route::resource
RouteController
Model
Models are located in directory, since Eloquent is used as database provider, you can write model like you write model for Laravel, for complete documentation about eloquent, please refer to http://laravel.com/docs/eloquent
file : app/models/Book.php
Note: Eloquent has some limitations due to dependency to some Laravel's and Symfony's components which is not included, such as , , and validation method, which is depend on , , , etc.
Controller
Controllers are located in directory, you may extends the BaseController to get access to predefined helper. You can also place your controller in namespace to group your controller.
file : app/controllers/HomeController.php
Controller helper
Get reference to Slim instance
You can access Slim instance inside your controller by accessing $app property
Loading javascript assets or CSS assets
SlimStarter shipped with default master template with js and css asset already in place, to load your own js or css file you can use or , or to remove js or css, or to remove all queued js or css file.
Publish PHP variable to javascript
You can also publish PHP variable to make it accessible via javascript (must extends master.twig)
the user variable will be accessible in 'global' namespace
Default variable available in template
View
Views file are located in directory in twig format, there is master.twig with 'body' block as default master template shipped with SlimStarer that will provide default access to published js variable.
For detailed Twig documentation, please refer to http://twig.sensiolabs.org/documentation
file : app/views/welcome.twig
Rendering view inside controller
If your controller extends the BaseController class, you will have access to $data property which will be the placeholder for all view's data.
Hooks and Middlewares
You can still hook the Slim event, or registering Middleware to Slim instance in , Slim instance is accessible in variable.
You can write your own middleware class in directory.
file : app/middlewares/SomeActionMiddleware.php
In case autoloader cannot resolve your classes, do so composer can resolve your class location
All versions of slim-starter with dependencies
slim/slim Version 2.4.*
slim/views Version 0.1.2
twig/twig Version 1.*
twig/extensions Version *
itsgoingd/slim-facades Version dev-master
illuminate/database Version 4.*
cartalyst/sentry Version 2.*
ircmaxell/password-compat Version 1.0.*