Download the PHP package slimmy/framework without Composer
On this page you can find all versions of the php package slimmy/framework. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package framework
slimmy-framework
Mini (H)MVC framework based on Slim micro framework combined with illuminate/database Laravel for model and Twig template engine for view.
It is just instant way to create Slim project with simple (H)MVC architecture.
Indonesian? nih README versi Indonesianya
Features
- powerful Eloquent ORM for Models.
- beautiful Twig Template Engine for Views.
- simple Modular System.
- great Laravel Validator.
Installation
First, make sure you have composer installed on your machine, and follow steps below:
- open terminal or cmd(in Windows)
- go to your based project directory(eg: htdocs in XAMPP, or www in WAMP)
-
run composer command below:
composer create-project slimmy/framework yourprojectdirname --prefer-dist
After finish installation, open localhost/yourprojectdirname/public
in your browser.
Basic Guides
Controller
Controller is a Class that grouping some actions/methods in your application, and these actions/methods can be called via Route. Controller files located in app/controllers
.
For example, you want to create some actions to manage user
And you can call these actions in your route file by:
Model
Models are PHP classes that are designed to simplify interact with your table in your database. Model files located in app/models
directory. To make your model work, you must create at least one database connections on your app/configs/database.php
file.
For example, you have users
table on your database, so the User model file might look like this:
this framework using Eloquent laravel for Model, so you can read full documentation about using Eloquent here
View
View basically is a file that contain HTML, css or js code that rendered to browser as a web page. View files by default is located on app/views
directory. This framework use twig as View, so you should use .twig
as extension.
Rendering a view in controller
Rendering a view by Closure in Route
For documentation about twig syntax, you can find it in twig official site here
Working with module
Module basically is a directory that contain their own controllers
, models
, and views
files.
Module used if you want to distribute tasks with your development team, crew A focused on module User, crew B focused on module Post, etc. And it can also simplify to migrate a part of your slimmy application to another slimmy application.
by default modules are located on
app/modules
.
Module Directory Structure
Basically, module structure might look like this
Call Module Controller action/method from Route
Rendering Module View
Rendering module view is little bit different, because view in the module have it's own namespace. So, you should call these views in format @[ModuleName]/[viewpath/viewname.twig]
.
For example, if you want render form-edit-user.twig
in User
module.
More from official documentation
- Routing: http://docs.slimframework.com/#Routing-Overview
- Rendering a view: http://docs.slimframework.com/#Rendering
- Twig for view: http://twig.sensiolabs.org/
- Eloquent Model: http://laravel.com/docs/eloquent
- Validation: http://laravel.com/docs/validation
All versions of framework with dependencies
rakit/slimmy Version 0.*
illuminate/validation Version 4.1.*
itsgoingd/slim-facades Version 1.0