0

enter image description hereenter image description here

This error I am getting in Laravel. Can I know what exactly can be the issue. I have spent my full day into this.

tereško
  • 58,060
  • 25
  • 98
  • 150
Neharika
  • 95
  • 11

3 Answers3

2

you should pass all your variables you use in view, if you use $title as a title for each page in your website you should pass it from your controller function to the view like this:

return View::make('home.index')->with('title', 'your title here'); 

and in your view you can make a condition to display public title to all pages don't have a title like this:

@if(isset($title)){{$title}} @else {{'Default title here'}} @endif
Gouda Elalfy
  • 6,888
  • 1
  • 26
  • 38
2

Check your Controller. If in controller variable $title is empty and you manipulate with it then you will get similar error.

Mindau
  • 690
  • 6
  • 19
1

your $title variable is null .
Make sure that $title is not null
try this in your blade

@if(isset($title)){{$title}}@endif
paranoid
  • 6,799
  • 19
  • 49
  • 86