Question: Unexepected error in laravel method when index method is called

Question

Unexepected error in laravel method when index method is called

Answers 1
Added at 2017-01-01 11:01
Tags
Question

I have the following code in my Notices controller:

public function index() {
        $notices = Notice::all();
        return view('notices.index' , compact('notices'));
}

Now as soon as i get the route that calls the index method in my controller i get the following error:

enter image description here

Why am i getting this semi-colon error ??

Thank you.

Answers
nr: #1 dodano: 2017-01-01 11:01

This error says you're using ; in unexpected place in one of your views, for example:

{{ $variable; }}

Instead of:

{{ $variable }}

If you're not sure where exactly error is, open 9a2e0ee...d6.php file which is in storage/framework/views directory and look at line 24. This .php file is cached view, you should fix the problem in original view which is in resources/views directory.

Source Show
◀ Wstecz