TinyLara

Document Download Zip V1.2

Simple, Fast and Sexy PHP Framework



Download:

git clone https://github.com/TinyLara/TinyLara
cd TinyLara

OR:

wget https://github.com/TinyLara/TinyLara/archive/v1.2.zip
unzip v1.2.zip
cd TinyLara-1.2

Install dependencies:

composer update

Then modify app/database.php with right information and import demo.sql.


Just see:

config/routes.php :

Route::get('', 'HomeController@home');

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');
}

Run:

cd public && php -S 127.0.0.1:3000

Visit http://127.0.0.1:3000/


It's already running!