storages
This commit is contained in:
25
app/Http/Livewire/Project/Application/Storages/Show.php
Normal file
25
app/Http/Livewire/Project/Application/Storages/Show.php
Normal file
@@ -0,0 +1,25 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire\Project\Application\Storages;
|
||||
|
||||
use Livewire\Component;
|
||||
|
||||
class Show extends Component
|
||||
{
|
||||
public $storage;
|
||||
protected $rules = [
|
||||
'storage.name' => 'required|string',
|
||||
'storage.mount_path' => 'required|string',
|
||||
'storage.host_path' => 'string|nullable',
|
||||
];
|
||||
public function submit()
|
||||
{
|
||||
$this->validate();
|
||||
$this->storage->save();
|
||||
}
|
||||
public function delete()
|
||||
{
|
||||
$this->storage->delete();
|
||||
$this->emit('refreshStorages');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user