Rainieren
1 year ago

Laravel - Unexpected token }

Posted 1 year ago by Rainieren

Hello Again, I'm following Jeffrey's forum tutorial, Episode 36 and I ran into a problem AGAIN which I can't solve. This is a weird error and the longest error code I've ever seen, Anyway, the error is in this picture: https://imgur.com/a/annjq

The problem is, Now my whole post page does not show. And the thing is. If I uncomment this

@if(Auth::user()->id == $post->user_id)
                            <form action="{{ $post->path() }}" method="POST">
                                {{ csrf_field() }}
                                {{ method_field('DELETE') }}

                                <button type="submit" class="btn btn-link p-0">Verwijder post</button>
                            </form>
                            @else

                            @endif

from my show.blade file it gives me the error: Trying to get property of non-object I did not do anything. Everything worked fine and suddenly this happened. I don't know where to look for the problem but I bet it has something to do with the replies. this Occured when I was following the tutorial from 14:21 to 14:54. I'm absolutely horrible at problem solving. I'm sorry for asking so many questions.

Thanks in advance

Please sign in or create an account to participate in this conversation.