Giter Site home page Giter Site logo

tinylara's Introduction

TinyLara

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

TinyLara is a Simple PHP Framework based on Composer, looks like a Tiny Laravel.

Start

Download:

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

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

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

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/TinyRoute, 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

tinylara's People

Contributors

johnlui avatar

Watchers

Hao Lee avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.