You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md
24
-
And Laravel: https://laravel.com/docs/6.x/installation
24
+
And Laravel: https://laravel.com/docs/7.x/installation
25
25
26
26
## Installation
27
27
@@ -30,11 +30,12 @@ After initializing a fresh instance of Laravel (and making all the necessary con
30
30
### Via composer
31
31
32
32
1.`Cd` to your Laravel app
33
-
2. Install this preset via `composer require laravel-frontend-presets/light-bootstrap`. No need to register the service provider. Laravel 5.5 & up can auto detect the package.
34
-
3. Run `php artisan preset light-bootstrap` command to install the Light Bootstrap preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php`
33
+
2. Type in your terminal: `composer require laravel/ui` and `php artisan ui vue --auth`
34
+
3. Install this preset via `composer require laravel-frontend-presets/light-bootstrap`. No need to register the service provider. Laravel 8.x can auto detect the package.
35
+
4. Run `php artisan ui light-bootstrap` command to install the Light Bootstrap preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php`
35
36
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
36
-
4. In your terminal run `composer dump-autoload`
37
-
5. Run `php artisan migrate --seed` to create basic users table
37
+
5. In your terminal run `composer dump-autoload`
38
+
6. Run `php artisan migrate --seed` to create basic users table
38
39
39
40
### By using the archive
40
41
@@ -44,17 +45,18 @@ After initializing a fresh instance of Laravel (and making all the necessary con
44
45
4. Open `composer.json` file
45
46
5. Add `"LaravelFrontendPresets\\LightBootstrapPreset\\": "presets/light-bootstrap/src"` to `autoload/psr-4` and to `autoload-dev/psr-4`
46
47
6. Add `LaravelFrontendPresets\LightBootstrapPreset\LightBootstrapPresetServiceProvider::class` to `config/app.php` file
47
-
7. In your terminal run `composer dump-autoload`
48
-
8. Run `php artisan preset light-bootstrap` command to install the Light Bootstrap preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php`
48
+
7. Type in your terminal: `composer require laravel/ui` and `php artisan ui vue --auth`
49
+
8. In your terminal run `composer dump-autoload`
50
+
9. Run `php artisan ui light-bootstrap` command to install the Light Bootstrap preset. This will install all the necessary assets and also the custom auth views, it will also add the auth route in `routes/web.php`
49
51
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
50
-
9. Run `php artisan migrate --seed` to create basic users table
52
+
10. Run `php artisan migrate --seed` to create basic users table
51
53
52
54
53
55
## Usage
54
56
55
57
Register a user or login using **admin@lightbp.com** and **secret** and start testing the preset (make sure to run the migrations and seeders for these credentials to be available).
56
58
57
-
Besides the dashboard and the auth pages this preset also has a user management example and an edit profile page. All the necessary files (controllers, requests, views) are installed out of the box and all the needed routes are added to `routes/web.php`. Keep in mind that all of the features can be viewed once you login using the credentials provided above or by registering your own user.
59
+
Besides the dashboard and the auth pages this preset also has an edit profile page. All the necessary files (controllers, requests, views) are installed out of the box and all the needed routes are added to `routes/web.php`. Keep in mind that all of the features can be viewed once you login using the credentials provided above or by registering your own user.
58
60
59
61
### Dashboard
60
62
@@ -87,54 +89,6 @@ public function rules()
87
89
];
88
90
}
89
91
```
90
-
91
-
### User management
92
-
93
-
The preset comes with a user management option out of the box. To access this click the "**User Management**" link in the left sidebar or add **/user** to the url.
94
-
The first thing you will see is the listing of the existing users. You can add new ones by clicking the "**Add user**" button (above the table on the right). On the Add user page you will see the form that allows you to do this. All pages are generate using blade templates:
Also validation rules were added so you will know exactely what to enter in the form fields (see `App\Http\Requests\UserRequest`). Note that these validation rules also apply for the user edit option.
Once you add more users, the list will get bigger and for every user you will have edit and delete options (access these options by clicking the three dotted menu that appears at the end of every line).
127
-
128
-
All the sample code for the user management can be found in `App\Http\Controllers\UserController`. See store method example bellow:
129
-
130
-
```
131
-
public function store(UserRequest $request, User $model)
0 commit comments