Branch - Admin Role
About
This branch provides additional functionality for roles/permissions provided by the spatie/laravel-permission composer package.
Features
Adminrole seeded by default- Artisan command to register new Users (and optionally assign their roles)
- Example Users index page utilizing
usePaginatedDataTable()composable
Setup
Clone from source repository, specifying the branch.
bash
git clone -b feature/admin-role https://github.com/connorabbas/laravel-primevue-starter-kit.git your-project-namebash
git clone -b feature/admin-role git@github.com:connorabbas/laravel-primevue-starter-kit.git your-project-nameFollow the standard setup instructions.
Register User command
Since there is no registration page for admins, use the following artisan command:
bash
php artisan user:registerAnd assign the Admin role.
Admin Pages
A separate Admin dashboard page, and a Users index page are provided by default, protected by the role:Admin middleware
The Users index page provides an example using the usePaginatedDataTable() composable and PrimeVue's <DataTable /> component. To seed the users table with test data (locally) you can run:
bash
php artisan db:seed