Added Extruder Livewire components with Create, Edit, Show, and Index. Introduced corresponding routes, views, and navigation updates. Enhanced Buildplate and Manufacturer views for improved linking and consistency.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
<?php
|
||||
|
||||
namespace App\Livewire\Extruder;
|
||||
|
||||
use App\Models\Extruder as Model;
|
||||
use Livewire\Attributes\Title;
|
||||
use Livewire\Component;
|
||||
use Livewire\WithPagination;
|
||||
|
||||
#[title('Extruders')]
|
||||
class Extruder extends Component
|
||||
{
|
||||
use WithPagination;
|
||||
|
||||
public $search ='';
|
||||
|
||||
public function create(){
|
||||
return $this->redirectRoute('extruder.create', navigate: true);
|
||||
}
|
||||
public function edit($id){
|
||||
return $this->redirectRoute('extruder.edit', $id, navigate: true);
|
||||
}
|
||||
public function show($id){
|
||||
return $this->redirectRoute('extruder.show', $id, navigate: true);
|
||||
}
|
||||
public function delete($id){
|
||||
Model::destroy($id);
|
||||
}
|
||||
|
||||
public function render()
|
||||
{
|
||||
return view('livewire.extruder.index', [
|
||||
'extruders' => Model::search('name', $this->search)->paginate(10),
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user