Removed all controller and view files related to Colors, Filaments, Filament Types, and Manufacturers.
This commit is contained in:
@@ -9,6 +9,7 @@ use Livewire\Attributes\title;
|
||||
use Livewire\Attributes\Validate;
|
||||
use Flux\Flux;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
use App\Models\Filament;
|
||||
|
||||
#[title('Manufacturer List')]
|
||||
class Manufacturer extends Component{
|
||||
@@ -30,7 +31,7 @@ class Manufacturer extends Component{
|
||||
|
||||
|
||||
// Validate
|
||||
$this->validate();
|
||||
$this->validate();
|
||||
|
||||
$manufacturer = new Model();
|
||||
$manufacturer->name = $this->name;
|
||||
@@ -55,12 +56,12 @@ class Manufacturer extends Component{
|
||||
$this->name = $manufacturer->name;
|
||||
$this->description = $manufacturer->description;
|
||||
$this->website = $manufacturer->website;
|
||||
|
||||
|
||||
Flux::modal('editModal')->show();
|
||||
}
|
||||
public function save($editid) {
|
||||
@Auth::check();
|
||||
|
||||
|
||||
$manufacturer = Model::findOrFail($editid);
|
||||
$manufacturer->name = $this->name;
|
||||
$manufacturer->description = $this->description;
|
||||
@@ -68,7 +69,7 @@ class Manufacturer extends Component{
|
||||
$manufacturer->save();
|
||||
|
||||
$this->resetInputFields();
|
||||
|
||||
|
||||
Flux::modal('editModal')->close();
|
||||
}
|
||||
public function deleteModal($manufacturerid) {
|
||||
@@ -105,6 +106,7 @@ class Manufacturer extends Component{
|
||||
|
||||
public function render()
|
||||
{
|
||||
|
||||
return view('livewire.filament.manufacturer', [
|
||||
'manufacturers' => Model::search('name', $this->search)->paginate(10)
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user