Rohan Kalra
Rohan Kalra

Reputation: 1

How to return a file from Laravel 5

every time I run this block

Route::get('myass',function(){

    return view("index");
});

It shows index file cannot be found but its already there any help?

Upvotes: 0

Views: 209

Answers (1)

Marcin Nabiałek
Marcin Nabiałek

Reputation: 111839

Using method view you are trying to return parsed content of resources/views/index.blade.php or resources/views/index.php. It seems that you put your file into wrong directory or it has different extension.

Upvotes: 1

Related Questions