Category Management

The Admin or Creator user has access to a categories management table page.


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 "Category Management" link in the left sidebar. You can add and edit categories here, but you can only delete them if they are not attached to any items.

              
                public function store(){

                    $attributes = request()->validate([
                        'name' => 'required|unique:categories,name',
                        'description' =>'required|min:5',
                    ]);

                    Category::create($attributes);

                    return redirect('category')->withStatus('Category successfully created.');
                }
              
              

The policy which authorizes the user to access category management pages is implemented in App\Policies\CategoryPolicy.php.