<?php

namespace App\Http\Main\Users;

use App\Models\Alert;
use App\Models\Drive;
use Livewire\Component;

class Drives extends Component
{
    public $alert;

    public function mount(){
        $this->alert = Alert::latest()->first();
    }
    public function render()
    {
    
            $drives = Drive::orWhere('user_id', auth()->user()->id)->get();
        
        return view('main.users.drives',[
            'drives'=>$drives
        ])->layout('layouts.app-frontdesk');
    }
}
