______ _ __
/_ __/ (_) ____ __ __ / / ____ _ _____ ____ _
/ / / / / __ \ / / / / / / / __ `/ / ___/ / __ `/
/ / / / / / / / / /_/ / / /___/ /_/ / / / / /_/ /
/_/ /_/ /_/ /_/ \__, / /_____/\__,_/ /_/ \__,_/
/____/
TinyLara is a Simple PHP Framework based on Composer, looks like a Tiny Laravel. Read the documentation.
git clone https://github.com/TinyLara/TinyLara
cd TinyLara
OR:
wget https://github.com/TinyLara/TinyLara/archive/v1.5.zip
unzip v1.5.zip
cd TinyLara-1.5
composer update
Then modify config/database.php
with right information and import demo.sql
.
config/routes.php :
Route::get('/', 'HomeController@home');
Route::any('foo', function() {
echo "Foo!";
});
app/controllers/HomeController.php :
public function home()
{
// mail sample
Mail::to('foo@bar.io')->from('bar@foo.io')
->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/TinyRouter, 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