user2648720
user2648720

Reputation: 43

Unable to route blade file in Laravel 4

I have problem in my Laravel 4 project. I want to start using blade template but all I got is error when loading project. I have an index.php view and this is my routes.php file:

Route::get('/', function()
{
     return View::make('index');
}

And all this works like a charm. But alter I change my view file name to index.blade.php nothing works anymore.

I have tried to change my routes.php file to:

    Route::get('/', function()
{
     return View::make('index.blade');
}

But no luck.

What I have been missing?

Upvotes: 0

Views: 298

Answers (1)

user2600285
user2600285

Reputation: 149

Try setting up your local environment to get more detailed error messages.

http://laravel.com/docs/configuration#environment-configuration

You should be good to go with:

Route::get('/', function()
{
    return View::make('index');
});

Notice the closing parenthesis and semicolon, which is the only thing that I notice missing from your code.

Upvotes: 1

Related Questions