Laravel is a clean and classy framework for PHP web development. Freeing you from spaghetti code, Laravel helps you create wonderful applications using simple, expressive syntax. Development should be a creative experience that you enjoy, not something that is painful. Enjoy the fresh air.
Laravel is a clean and classy framework for PHP web development. Freeing you from spaghetti code, Laravel helps you create wonderful applications using simple, expressive syntax. Development should be a creative experience that you enjoy, not something that is painful. Enjoy the fresh air.
### Beautifully Expressive Syntax
### Quickly Build Beautiful Applications
Stay true to the web with RESTful routing:
Stay true to the web with RESTful routing:
'GET /' => function()
'GET /' => function()
{
{
return View::make('home/index');
return View::make('home.index');
}
}
Laravel serves as a great framework for writing everything from JSON APIs to full web applications. You can use RESTful routes and anonymous functions to quickly build beautiful applications, or use controllers to organize your growing application:
class Home_Controller extends Controller {
public function action_index()
{
return View::make('home.index');
}
}
### Wonderfully Expressive Syntax
Redirect to a named route and flash something to the session:
Redirect to a named route and flash something to the session:
Laravel makes common tasks refreshingly simple. What other frameworks make drudgery Laravel makes blissful. Need to flash input to the session and redirect to a form? It's a breeze:
return Redirect::to('register')->with_input();
Then access the previous request's input using the Input class:
echo Input::old('email');
### Dead Simple Data Access
Laravel provides several ways to access your data, ranging from raw SQL to a beautiful little ORM. MySQL, Postgres, and SQLite are supported out of the box.
Retrieve a blog post and eagerly load the comments using Eloquent ORM:
Retrieve a blog post and eagerly load the comments using Eloquent ORM:
$posts = Post::with('comments')->find(1);
$posts = Post::with('comments')->find(1);
Get input from the previous request to re-populate a form:
Use the fluent query builder to execute SQL statements: