Hi.
First: read about Eleoquent ORM, how to get data from database. http://laravel.com/docs/4.2/eloquent
Second: Learn here how to pass data to views. http://laravel.com/docs/4.2/responses#views
Resume / Example:
Route::get('/', function()
{
$data = Model::all(); // where "Model" can be any model you have inside of models directory or declared (eg. User).
return View::make('index')->with('data', $data); // now you can use the variable $data inside of your view.
});
Best luck.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community