it means you should pass a variable called name to your view or do this:
<title>{{isset($name) ? $name: ''}}</title>
thanks @beanmoss it stopped it from crashing. but do I ad another {{}} inside the quotes to make the name change dynamically? I want every story to have its own title. Just got your message. I'll experiment and see. But still thanks
The error you got is due to you did not pass $name variable to view Or you did spelling mistake while writing $name
you can see following code
$storyname = 'some name'; // you can pass dynamic name from here
View::make('story.show')->with('name',$storyname ) ;
If you are passing story model to view
$story = Story::find(1);
View::make('story.show')->with('name',$story ) ;
Then In your view you must write like this
<title>{{$name->name}}</title>
You can't directly echo $name
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community