are you visiting the file directly?
using the File in the browser with the URL like file://<path_to_file>/file_name.blade.php ?
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Using ajax to like and dislike system in laravel 5.5
<div class="row">
<div class="col-sm-8">
<div class="blog-post">
@foreach ($posts as $post)
<div class="post" data-postid="{{ $post->id }}">
<a href="#"><h3>{{$post->title}}</h3></a>
<h6>Posted on {{$post->created_at}} by {{$post->user->name}}</h6>
<p>{{$post->body}}</p>
<div class="interaction">
<a href="#">Like</a>
<a href="#">Dislike</a>
</div>
</div>
@endforeach
Please or to participate in this conversation.