app/Http/Controllers/EventController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index()
    {
        return Inertia::render('Dashboard', [
            'events' => new EventCollection(Auth::user()->events)
        ]);
    }
public function index ( ) { return Inertia :: render ( 'Dashboard' , [ 'events' => new EventCollection ( Auth :: user ( ) -> events ) ] ) ; }
Display a listing of the resource.
Display a listing of the resource .
// ['purchases' => new PurchaseCollection(Auth::user()->account->accountable->purchases()->with(['transactions', 'purchasedItems', 'courier'])->paginate())] // 'prescription_image' => Storage::disk('s3')->temporaryUrl($this->file, now()->addMinutes(5)), // 'events' => Event::all()->where('user_id', Auth::user()->id),