DEV Community

Cliff Levai
Cliff Levai

Posted on

Laravel views and controller

In Laravel it is always good to return your view from the controller not from your pages view,
For example:
Route::get('/pageName','PagesController@index');

and example to do in the controller file:
public function index(){
return views('pages/index');

GoomBugi

Top comments (0)