<?php
namespace App\Livewire;
use App\Models\Repair;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Illuminate\Contracts\View\View;
use Livewire\Component;
use Filament\Notifications\Notification;
class ConfirmQuote extends Component implements HasForms
{
use InteractsWithForms;
public function acceptQuote($id, $tracking): void
{
$repair = Repair::where('id', $id)
->where('tracking_code', $tracking)
->firstOrFail();
$repair->update([
'quote_accepted' => now(),
]);
Notification::make()
->title('Quote Accepted')
->body('Your quote has been accepted on '.$repair->quote_accepted->format('d/m/Y'))
->success()
->send();
// $this->redirectRoute('livewire.confirm-quote');
}
public function render(): View
{
return view('livewire.confirm-quote');
}
}
<?php
namespace App\Livewire;
use App\Models\Repair;
use Filament\Forms\Concerns\InteractsWithForms;
use Filament\Forms\Contracts\HasForms;
use Illuminate\Contracts\View\View;
use Livewire\Component;
use Filament\Notifications\Notification;
class ConfirmQuote extends Component implements HasForms
{
use InteractsWithForms;
public function acceptQuote($id, $tracking): void
{
$repair = Repair::where('id', $id)
->where('tracking_code', $tracking)
->firstOrFail();
$repair->update([
'quote_accepted' => now(),
]);
Notification::make()
->title('Quote Accepted')
->body('Your quote has been accepted on '.$repair->quote_accepted->format('d/m/Y'))
->success()
->send();
// $this->redirectRoute('livewire.confirm-quote');
}
public function render(): View
{
return view('livewire.confirm-quote');
}
}