Laravel Validation The cover image must be an image problem

I am getting this error message for my code.. I can’t figure out why it is showing me this Blade Template file : <div class=”well” style=”font-family:arial;”> <div class=”well-body”> <form class=”POST” action=”/admin-panel/shows/store” enctype=”multipart/form-data”> @csrf <table class=”table table-striped”> <tr> <th>Show Name</th> <th> <div class=”form-group”> <input type=”text” class=”form-control” name=”name” placeholder=”e.g, Avengers”/> </div> </th> </tr> <tr> <th>Cover Image</th> <th>…

Get daily data for Laravel 5.4

I want to get daily data from my database. I try 2 code and both are not working for me. $sales=Sale::whereDate(‘created_at’, ‘=’, Carbon::today()); The error that I got: Class ‘App\Http\Controllers\Carbon’ not found and when I try $sales=Sale::whereDay(‘created_at’, now()->day)->get(); The error that I got: Call to undefined function App\Http\Controllers\now()

Forelse is not working properly in laravel?

My laravel version is 5.4.36. I want to use forelse to show message when the condition is not meet. @forelse ($items as $item) <p> @if ($item->quantity<$item->minimum_no) <span class=”label label-danger”>Item need to be ordered now ! </span> @elseif($item->quantity<($item->minimum_no+10)) <span class=”label label-warning”>Item is low !</span> @endif </p> @empty <p>No message</p> @endforelse But, it only show the message…

How To Get Laravel 5.8 Pagination To Work With Angular 8

Am having problems getting the next set of results from the database using laravel pagination. My results looks like this from this route: api/getMerchants { “merchants”: { “current_page”: 1, “data”: [], // contains some data “first_page_url”: “/?page=1”, “from”: null, “next_page_url”: “/?page=2”, “path”: “/”, “per_page”: 15, “prev_page_url”: null, “to”: null } } Now when I try…