Ayman Hussein
Ayman Hussein

Reputation: 3857

error in blade template syntax error, unexpected '}' - laravel 5

I have method index in users controller

public function index()
{
    return view('users.profile')->with('title', 'ayman');
}

In users/profile.blade.php file:

<?php
 {{ $title }}

In route.php

Route::get('profile', 'users\UserController@index');

when run the page: http://localhost:8080/public/profile

I got this error

 1/1 FatalErrorException in a5c4244e0ec8b952d428220fcdcd0d45 line 2: syntax error, unexpected '}' 

I am using Laravel 5.

may blade template not enabled?

Upvotes: 2

Views: 1865

Answers (1)

vural
vural

Reputation: 391

Try without <?php tags

I hope it helps.

Upvotes: 4

Related Questions