{{-- Manage User Listings page --}} {{-- class="p-10" is passed in to the Blade Component using Component Attributes: https://laravel.com/docs/9.x/blade#component-attributes --}}

Manage Ads

{{-- @unless (count($listings) == 0) --}} @unless ($listings->isEmpty()) {{-- isEmpty(): https://laravel.com/docs/9.x/collections#method-isempty --}} @foreach ($listings as $listing) {{-- $listings are the listings of the currently authenticated/logged in user ONLY --}} @endforeach @else {{-- if there're no any listings for the currently authenticated/logged in user --}} @endunless
{{ $listing->title }} Edit
{{-- this will hit the delete() method of the /listings/{listing} route to hit the destroy() method in ListingController.php --}} @csrf @method('DELETE') {{-- HTML -s can't make PUT, PATCH, or DELETE requests, so you need to add a hidden _method field to spoof these HTTP verbs, using @method() Blade directive --}} {{-- Method Field: https://laravel.com/docs/9.x/blade#method-field --}}

No Listings Found