44
55With LLoadout Enforce you will kickstart your Laravel development when using Laravel Jetstream and Spatie permissions.
66
7+ ## Users, roles and permissions
8+
9+ LLoadout Enforce will add a ui for managing users, roles, permission and menus. It will also provide you with
10+ an ui to link users to roles and assign permissions to roles.
11+
712## Installation
813
914``` shell
1015composer require lloadout/enforce
1116```
1217
13- ## Installing Laravel Jetstream ( if you didn't already install it )
18+ If you are starting from a new installation and need to install Laravel Jetstream or Spatie Permissions , you need to do the additional steps
19+ documented at the end of this documentation.
1420
15- ``` php
16- php artisan jetstream:install livewire
17- ```
21+ ### Assets
1822
19- After this you have to install and build the assets
23+ LLoadout enforce uses some default menus and permissions, these can be created via the provided migrations and seeder.
2024
2125``` shell
22- npm install
23- npm run dev
26+ php artisan vendor:publish --tag=LLoadoutEnforce-migrations
27+ php artisan vendor:publish --tag=LLoadoutEnforce-seeders
28+ php artisan migrate
29+ php artisan db:seed --class=EnforceSeeder
2430```
2531
26- ## Installing Laravel Permissions ( if you didn't already install it )
27-
28- if you hadn't already installed Laravel Permissions then you should first publish the config file and migrations.
29-
30- php artisan vendor: publish --provider="Spatie\Permission\PermissionServiceProvider"
31-
32+ You also have to publish the datatables components configuration to set the theme to tailwind
3233
33- First, add the Spatie\Permission\Traits\HasRoles trait to your User model(s):
34+ ``` shell
35+ php artisan vendor:publish --provider=" Rappasoft\LaravelLivewireTables\LaravelLivewireTablesServiceProvider" --tag=config
36+ ```
37+ Change the ` theme ` config setting to ` tailwind ` in the published file.
3438
35- ``` php
36- use Illuminate\Foundation\Auth\User as Authenticatable;
37- use Spatie\Permission\Traits\HasRoles;
3839
39- class User extends Authenticatable
40- {
41- use HasRoles;
40+ ### Publish optional assets
4241
43- // ...
44- }
42+ ``` shell
43+ php artisan vendor:publish --tag=LLoadoutEnforce-views
4544```
4645
47- ## Users, roles and permissions
48- LLoadout Enforce will add a ui to manage your users, roles, permission and menus. It will also provide you with
49- a ui to link users to roles and assign permissions to roles.
46+ ## Logging in
47+
48+ LLoadout enforce will default create a user with username of ` john@doe.com ` and the password ` password `
5049
5150## Navigation
5251
@@ -58,23 +57,39 @@ Therefore you have to add this tag after the dashboard navigation div in navigat
5857 <livewire:navigation />
5958```
6059
61- ### Assets
6260
63- LLoadout enforce uses some default menus and permissions, these can be created via the provided migrations and seeder.
61+ ## Installing Laravel Jetstream ( if you didn't already install it )
6462
65- ``` shell
66- php artisan vendor:publish --tag=LLoadoutEnforce-migrations
67- php artisan vendor:publish --tag=LLoadoutEnforce-seeders
68- php artisan migrate
69- php artisan db:seed --class=EnforceSeeder
63+ ``` php
64+ composer require laravel/jetstream
65+
66+ php artisan jetstream:install livewire
7067```
7168
72- ### Publish optional assets
69+ After this you have to install and build the assets
7370
7471``` shell
75- php artisan vendor:publish --tag=LLoadoutEnforce-views
72+ npm install
73+ npm run dev
7674```
7775
78- ## Logging in
76+ ## Installing Laravel Permissions ( if you didn't already install it )
7977
80- LLoadout enforce will default create a user with username of ` john@doe.com ` and the password ` password `
78+ if you hadn't already installed Laravel Permissions then you should first publish the config file and migrations.
79+
80+ php artisan vendor: publish --provider="Spatie\Permission\PermissionServiceProvider"
81+
82+
83+ First, add the Spatie\Permission\Traits\HasRoles trait to your User model(s):
84+
85+ ``` php
86+ use Illuminate\Foundation\Auth\User as Authenticatable;
87+ use Spatie\Permission\Traits\HasRoles;
88+
89+ class User extends Authenticatable
90+ {
91+ use HasRoles;
92+
93+ // ...
94+ }
95+ ```
0 commit comments