flowtodo/app/Livewire/ListSelect.php
Javier Feliz 0ddd325281
Some checks are pending
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
Initial commit
2025-07-15 18:28:47 -04:00

30 lines
550 B
PHP

<?php
namespace App\Livewire;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Support\Facades\Auth;
use Livewire\Component;
class ListSelect extends Component
{
public Collection $lists;
public string $new_list_name;
public function mount()
{
$this->lists = Auth::user()->taskLists;
}
public function createList()
{
$list = Auth::user()->taskLists()->create(['name' => $this->new_list_name]);
}
public function render()
{
return view('livewire.list-select');
}
}