A Simple PHP Framework based on Composer, looks like a Tiny Laravel.
Switch branches/tags
Clone or download
Latest commit 17f4e96 Sep 3, 2018

README.md

TinyLara Travis

  ______    _                      __
 /_  __/   (_)   ____    __  __   / /   ____ _   _____  ____ _
  / /     / /   / __ \  / / / /  / /   / __ `/  / ___/ / __ `/
 / /     / /   / / / / / /_/ /  / /___/ /_/ /  / /    / /_/ /
/_/     /_/   /_/ /_/  \__, /  /_____/\__,_/  /_/     \__,_/
                      /____/

TinyLara is a Simple PHP Framework based on Composer, looks like a Tiny Laravel. Read the documentation. TinyLara supports PHP7 now!

Start

Download:

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

Install dependencies:

composer update

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

Just see:

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

Run:

cd public && php -S 127.0.0.1:3000

Visit http://127.0.0.1:3000/

It's already running!


Features

  1. Tiny router TinyLara/TinyRouter, based on fast and sexy codingbean/macaw
  2. MVC architecture
  3. One of the Most powerful PHP ORM on Earth: Laravel Eloquent
  4. Powerful Laravel-style view loader TinyLara/TinyView
  5. Redis ready in Laravel-style
  6. Handy SMTP mailer

License

The TinyLara framework is open-sourced software licensed under the MIT license