Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Hasnainali9's avatar

No response.

Hey working on a property solution I have a controller named booking Controller.

<?php

namespace App\Http\Controllers\Admin;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class BookingController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {

        $notifications = auth()->user()
            ->notifications
            ->where('type', 'App\Notifications\BookingRequest')
            ->all();
        return view('admin.bookings.index',compact('notifications'));
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        //
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        //
    }

    /**
     * Display the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function show($id)
    {
        //
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function edit($id)
    {
        //
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, $id)
    {
        //
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  int  $id
     * @return \Illuminate\Http\Response
     */
    public function destroy($id)
    {
     
     echo "Hello";    
       // return redirect()->route('admin.bookings.index');
    }
}

My Route

Route::group(['prefix' => 'admin','as' =>'admin.','middleware'=>'auth'], function () {
		Route::resource('bookings',Admin\BookingController::class);
});

When I try to hit the destroy URL by clicking on the link tag

<a href="{{route('admin.bookings.destroy', [$notification->id]) }}" class="btn v3">Cancel</a>
                                            <a href="#" class="btn v4">Approve</a>
```
it displays a blank page
0 likes
1 reply

Please or to participate in this conversation.