38 lines
816 B
PHP
38 lines
816 B
PHP
<?php
|
|
|
|
namespace App\Livewire\Filament;
|
|
|
|
use Livewire\Component;
|
|
use App\Models\Filament as Model;
|
|
use App\Models\Manufacturer;
|
|
use Livewire\WithPagination;
|
|
use Livewire\Attributes\title;
|
|
|
|
#[title('Show Filament')]
|
|
class EditFilament extends Component
|
|
{
|
|
|
|
public Model $filament ;
|
|
|
|
public function back(){
|
|
return redirect()->route('filaments.index');
|
|
}
|
|
|
|
public function show($id){
|
|
return redirect()->route('filaments.show', $id);
|
|
}
|
|
|
|
public function mount(Model $filament){
|
|
$this->filament = $filament;
|
|
}
|
|
|
|
public function render()
|
|
{
|
|
return view('livewire.filament.edit', [
|
|
'manufacturers' => Manufacturer::all(),
|
|
'colors' => \App\Models\Color::all(),
|
|
'types' => \App\Models\FilamentType::all()
|
|
]);
|
|
}
|
|
}
|