set up list management
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run

This commit is contained in:
Edward Tirado Jr 2025-12-13 19:33:52 -06:00
parent 0c42bef077
commit 73d6578857
26 changed files with 495 additions and 230 deletions

View file

@ -0,0 +1,33 @@
<?php
namespace App\Livewire\Forms;
use App\Models\MovieList;
use Livewire\Attributes\Locked;
use Livewire\Form;
class SettingsForm extends Form
{
#[Locked]
public ?int $listId = null;
public bool $isPublic = false;
public string $name = "";
public function setList(MovieList $list): void
{
$this->name = $list->name;
$this->listId = $list->id;
$this->isPublic = $list->is_public;
}
public function save(): void
{
if ($this->listId) {
$list = MovieList::find($this->listId);
$list->name = $this->name;
$list->is_public = $this->isPublic;
$list->save();
}
}
}