lasthourcloud/app/Http/Livewire/Project/Application/Storages/Show.php
Andras Bacsai 96b9f8213c storages
2023-05-05 12:08:38 +02:00

26 lines
538 B
PHP

<?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');
}
}