______ _ __
/_ __/ (_) ____ __ __ / / ____ _ _____ ____ _
/ / / / / __ \ / / / / / / / __ `/ / ___/ / __ `/
/ / / / / / / / / /_/ / / /___/ /_/ / / / / /_/ /
/_/ /_/ /_/ /_/ \__, / /_____/\__,_/ /_/ \__,_/
/____/
TinyLara is a Simple PHP Framework based on Composer, looks like a Tiny Laravel.
git clone https://github.com/TinyLara/TinyLara
cd TinyLara
OR:
wget https://github.com/TinyLara/TinyLara/archive/v1.0.zip
unzip v1.0.zip
cd TinyLara-1.0
composer update
Then modify app/database.php
with right information and import demo.sql
.
config/routes.php :
Route::get('', 'HomeController@home');
app/controllers/HomeController.php :
public function home()
{
// mail sample
Mail::to('[email protected]')->from('[email protected]')
->title('Foo Bar')
->content('<h1>Hello~~</h1>')
->send();
// redis sample
Redis::set('key','value',3000,'ms');
echo Redis::get('key');
// view sample
return View::make('home')->with('article',Article::first())
->withTitle('TinyLara :-D')
->withFooBar('foo_bar');
}
cd public && php -S 127.0.0.1:3000
Visit http://127.0.0.1:3000/
- Tiny router TinyLara/TinyRoute, based on fast and sexy codingbean/macaw
- MVC architecture
- One of the Most powerful PHP ORM on Earth: Laravel Eloquent
- Powerful Laravel-style view loader TinyLara/TinyView
- Redis ready in Laravel-style
- Handy SMTP mailer
The TinyLara framework is open-sourced software licensed under the MIT license