Skip to content

Commit 447d1f1

Browse files
Readme
1 parent f4ab92e commit 447d1f1

File tree

6 files changed

+564
-352
lines changed

6 files changed

+564
-352
lines changed

readme.md

Lines changed: 1 addition & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ After initializing a fresh instance of Laravel (and making all the necessary con
5454

5555
Register a user or login using **[email protected]** and **secret** and start testing the preset (make sure to run the migrations and seeders for these credentials to be available).
5656

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.
57+
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.
5858

5959
### Dashboard
6060

@@ -87,54 +87,6 @@ public function rules()
8787
];
8888
}
8989
```
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:
95-
96-
```
97-
<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
98-
<label class="form-control-label" for="input-name">
99-
<i class="w3-xxlarge fa fa-user"></i>{{ __('Name') }}
100-
</label>
101-
<input type="text" name="name" id="input-name" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" placeholder="{{ __('Name') }}" value="{{ old('name') }}" required autofocus>
102-
103-
@include('alerts.feedback', ['field' => 'name'])
104-
</div>
105-
```
106-
107-
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.
108-
109-
```
110-
public function rules()
111-
{
112-
return [
113-
'name' => [
114-
'required', 'min:3'
115-
],
116-
'email' => [
117-
'required', 'email', Rule::unique((new User)->getTable())->ignore($this->route()->user->id ?? null)
118-
],
119-
'password' => [
120-
$this->route()->user ? 'nullable' : 'required', 'confirmed', 'min:6'
121-
]
122-
];
123-
}
124-
```
125-
126-
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)
132-
{
133-
$model->create($request->merge(['password' => Hash::make($request->get('password'))])->all());
134-
135-
return redirect()->route('user.index')->withStatus(__('User successfully created.'));
136-
}
137-
```
13890
## Table of Contents
13991

14092
* [Versions](#versions)

src/light-bootstrap-stubs/app/Http/Controllers/UserController.php

Lines changed: 0 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -18,69 +18,4 @@ public function index(User $model)
1818
{
1919
return view('users.index', ['users' => $model->paginate(15)]);
2020
}
21-
22-
/**
23-
* Show the form for creating a new user
24-
*
25-
* @return \Illuminate\View\View
26-
*/
27-
public function create()
28-
{
29-
return view('users.create');
30-
}
31-
32-
/**
33-
* Store a newly created user in storage
34-
*
35-
* @param \App\Http\Requests\UserRequest $request
36-
* @param \App\User $model
37-
* @return \Illuminate\Http\RedirectResponse
38-
*/
39-
public function store(UserRequest $request, User $model)
40-
{
41-
$model->create($request->merge(['password' => Hash::make($request->get('password'))])->all());
42-
43-
return redirect()->route('user.index')->withStatus(__('User successfully created.'));
44-
}
45-
46-
/**
47-
* Show the form for editing the specified user
48-
*
49-
* @param \App\User $user
50-
* @return \Illuminate\View\View
51-
*/
52-
public function edit(User $user)
53-
{
54-
return view('users.edit', compact('user'));
55-
}
56-
57-
/**
58-
* Update the specified user in storage
59-
*
60-
* @param \App\Http\Requests\UserRequest $request
61-
* @param \App\User $user
62-
* @return \Illuminate\Http\RedirectResponse
63-
*/
64-
public function update(UserRequest $request, User $user)
65-
{
66-
$user->update(
67-
$request->merge(['password' => Hash::make($request->get('password'))])
68-
->except([$request->get('password') ? '' : 'password']
69-
));
70-
71-
return redirect()->route('user.index')->withStatus(__('User successfully updated.'));
72-
}
73-
74-
/**
75-
* Remove the specified user from storage
76-
*
77-
* @param \App\User $user
78-
* @return \Illuminate\Http\RedirectResponse
79-
*/
80-
public function destroy(User $user)
81-
{
82-
$user->delete();
83-
84-
return redirect()->route('user.index')->withStatus(__('User successfully deleted.'));
85-
}
8621
}

src/light-bootstrap-stubs/resources/views/pages/upgrade.blade.php

Lines changed: 67 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -9,65 +9,110 @@
99
<div class="col-md-8 ml-auto mr-auto">
1010
<div class="card">
1111
<div class="header text-center">
12-
<h4 class="title">Light Bootstrap Dashboard</h4>
13-
<p class="category">Are you looking for more components? Please check our Premium Version of Light Bootstrap Dashboard.</p>
12+
<h4 class="title">{{ __('Light Bootstrap Dashboard')}}</h4>
13+
<p class="category">{{ __('Are you looking for more components? Please check our Premium Version of Light Bootstrap Dashboard Laravel.')}}</p>
1414
<br>
1515
</div>
1616
<div class="content table-responsive table-upgrade">
1717
<table class="table">
1818
<thead>
1919
<th></th>
20-
<th class="text-center">Free</th>
21-
<th class="text-center">PRO</th>
20+
<th class="text-center">{{ __('Free')}}</th>
21+
<th class="text-center">{{ __('PRO')}}</th>
2222
</thead>
2323
<tbody>
2424
<tr>
25-
<td>Components</td>
26-
<td>16</td>
27-
<td>115+</td>
25+
<td><h3 class="mb-0 mt-0">Laravel</h3></td>
26+
<td class="text-center"></td>
27+
<td class="text-center"></td>
2828
</tr>
2929
<tr>
30-
<td>Plugins</td>
31-
<td>4</td>
32-
<td>14+</td>
30+
<td>Login, Register, Forgot password pages</td>
31+
<td><i class="fa fa-check text-success"></i></td>
32+
<td><i class="fa fa-check text-success"></i></td>
3333
</tr>
3434
<tr>
35-
<td>Example Pages</td>
36-
<td>4</td>
37-
<td>22+</td>
35+
<td>User profile</td>
36+
<td><i class="fa fa-check text-success"></i></td>
37+
<td><i class="fa fa-check text-success"></i></td>
3838
</tr>
3939
<tr>
40-
<td>Documentation</td>
40+
<td>Users management</td>
4141
<td><i class="fa fa-times text-danger"></i></td>
42-
<td><i class="fa fa-check text-success"></td>
42+
<td><i class="fa fa-check text-success"></i></td>
4343
</tr>
4444
<tr>
45-
<td>SASS Files</td>
45+
<td>User roles management </td>
46+
<td><i class="fa fa-times text-danger"></i></td>
47+
<td><i class="fa fa-check text-success"></i></td>
48+
</tr>
49+
<tr>
50+
<td>Items management </td>
51+
<td><i class="fa fa-times text-danger"></i></td>
52+
<td><i class="fa fa-check text-success"></i></td>
53+
</tr>
54+
<tr>
55+
<td>Categories management, Tags management </td>
56+
<td><i class="fa fa-times text-danger"></i></td>
57+
<td><i class="fa fa-check text-success"></i></td>
58+
</tr>
59+
<tr>
60+
<td>Image upload, date picker inputs</td>
61+
<td><i class="fa fa-times text-danger"></i></td>
62+
<td><i class="fa fa-check text-success"></i></td>
63+
</tr>
64+
<tr>
65+
<td>Radio button, checkbox, toggle inputs</td>
66+
<td><i class="fa fa-times text-danger"></i></td>
67+
<td><i class="fa fa-check text-success"></i></td>
68+
</tr>
69+
<tr>
70+
<td><h3 class="mb-0 mt-0">Frontend</h3></td>
71+
<td class="text-center"></td>
72+
<td class="text-center"></td>
73+
</tr>
74+
<tr>
75+
<td>{{ __('Components')}}</td>
76+
<td>{{ __('16')}}</td>
77+
<td>{{ __('115+')}}</td>
78+
</tr>
79+
<tr>
80+
<td>{{ __('Plugins')}}</td>
81+
<td>{{ __('4')}}</td>
82+
<td>{{ __('14+')}}</td>
83+
</tr>
84+
<tr>
85+
<td>{{ __('Example Pages')}}</td>
86+
<td>{{ __('7')}}</td>
87+
<td>{{ __('22+')}}</td>
88+
</tr>
89+
<tr>
90+
<td>{{ __('SASS Files')}}</td>
4691
<td><i class="fa fa-times text-danger"></i></td>
4792
<td><i class="fa fa-check text-success"></td>
4893
</tr>
4994
<tr>
50-
<td>Login/Register/Lock Pages</td>
95+
<td>{{ __('Login/Register/Lock Pages')}}</td>
5196
<td><i class="fa fa-times text-danger"></i></td>
5297
<td><i class="fa fa-check text-success"></td>
5398
</tr>
5499
<tr>
55-
<td>Premium Support</td>
100+
<td>{{ __('Premium Support')}}</td>
56101
<td><i class="fa fa-times text-danger"></i></td>
57102
<td><i class="fa fa-check text-success"></td>
58103
</tr>
59104
<tr>
60105
<td></td>
61-
<td>Free</td>
62-
<td>Just $149</td>
106+
<td>{{ __('Free')}}</td>
107+
<td>{{ __('Just $149')}}</td>
63108
</tr>
64109
<tr class="last-row">
65110
<td></td>
66111
<td>
67-
<a href="#" class="btn btn-round btn-fill btn-default disabled">Current Version</a>
112+
<a href="#" class="btn btn-round btn-fill btn-default disabled">{{ __('Current Version')}}</a>
68113
</td>
69114
<td>
70-
<a target="_blank" href=" https://www.creative-tim.com/product/light-bootstrap-dashboard-pro-laravel" class="btn btn-round btn-fill btn-info">Upgrade to PRO</a>
115+
<a target="_blank" href="https://www.creative-tim.com/product/light-bootstrap-dashboard-pro-laravel" class="btn btn-round btn-fill btn-info">{{ __('Upgrade to PRO') }}</a>
71116
</td>
72117
</tr>
73118
</tbody>

src/light-bootstrap-stubs/resources/views/users/create.blade.php

Lines changed: 0 additions & 60 deletions
This file was deleted.

0 commit comments

Comments
 (0)