how we can create controllers in laravel framework

 

how we can create controllers in laravel framework

Creating Controllers

We have learnt how we can use route and filters in our previous tutorial , Now we focus on laravel controller ,
very essential part of laravel programming, Controller is used to connect View with Model as per laravel framework consists of
Model View Controller (MVC) see below an example that would take care of tutorial !
<?php

// app/controllers/MatureController.php

class MatureController extends BaseController
{
public function showIndex()
{
return View::make(‘index’);
}

public function showSingle($MatureControllerid)
{
return View::make(‘single’);
}
}

 for more go to laravel