Category Management
Out of the box you will have an example of category management (for the cases in which you are developing a blog or a shop). To access this example, click the “Laravel Examples/Category Management” link in the left sidebar or add /categories to the URL. You can add and edit categories here, but you can only delete them if they are not attached to any items.
The policy which authorizes the user on categories management pages is implemented in App\Policies\CategoryPolicy.php
.
public function render()
{
return view('livewire.categories', [
'categories' => Category::searchMultipleRoles($this->fields, $this->search)->orderBy($this->sortField, $this->sortDirection)->paginate($this->entries),
]);
}