Skip to content

Commit a634260

Browse files
Merge pull request #15 from creativetimofficial/master
Update readme
2 parents dabc746 + 5583e93 commit a634260

File tree

7 files changed

+441
-361
lines changed

7 files changed

+441
-361
lines changed

.vscode/settings.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"workbench.colorCustomizations": {
3+
"activityBar.background": "#203033",
4+
"titleBar.activeBackground": "#2C4448",
5+
"titleBar.activeForeground": "#F7FAFA"
6+
}
7+
}

README.md

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -103,57 +103,6 @@ public function rules()
103103
];
104104
}
105105
```
106-
107-
108-
### User management
109-
110-
The theme comes with an out of the box user management option. To access this option ,click the "**Examples/User Management**" link in the left sidebar or add **/user** to the URL.
111-
The first thing you will see is a list of 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 find a form which allows you to fill out the user`s name, email, role and password. All pages are generated using blade templates:
112-
113-
```
114-
<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
115-
<label class="form-control-label" for="input-name">{{ __('Name') }}</label>
116-
<input type="text" name="name" id="input-name" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" placeholder="{{ __('Name') }}" value="{{ old('name') }}" required autofocus>
117-
@include('alerts.feedback', ['field' => 'name'])
118-
</div>
119-
```
120-
121-
Validation rules were added to prevent errors in the form fields (see `App\Http\Requests\UserRequest`). Note that these validation rules also apply for the user edit option.
122-
123-
```
124-
public function rules()
125-
{
126-
return [
127-
'name' => [
128-
'required', 'min:3'
129-
],
130-
'email' => [
131-
'required', 'email', Rule::unique((new User)->getTable())->ignore($this->route()->user->id ?? null)
132-
],
133-
'password' => [
134-
$this->route()->user ? 'nullable' : 'required', 'confirmed', 'min:6'
135-
]
136-
];
137-
}
138-
```
139-
140-
The policy which authorizes the user to access the user management pages is implemented in `App\Policies\UserPolicy.php`.``
141-
142-
Once you add more users, the list will grow 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 row).
143-
144-
All the sample code for the user management can be found in `App\Http\Controllers\UserController`. See store method example bellow:
145-
146-
```
147-
public function store(UserRequest $request, User $model)
148-
{
149-
$model->create($request->merge([
150-
'picture' => $request->photo ? $request->photo->store('profile', 'public') : null,
151-
'password' => Hash::make($request->get('password'))
152-
])->all());
153-
154-
return redirect()->route('user.index')->withStatus(__('User successfully created.'));
155-
}
156-
```
157106
## Table of Contents
158107

159108
* [Versions](#versions)
@@ -433,8 +382,6 @@ The documentation for the now-ui Dashboard Laravel is hosted at our [website](ht
433382
│   ├── profile
434383
│   │   └── edit.blade.php
435384
│   ├── users
436-
│   │   ├── create.blade.php
437-
│   │   ├── edit.blade.php
438385
│   │   └── index.blade.php
439386
│   └── welcome.blade.php
440387
└── .vscode

src/now-ui-stubs/app/Http/Controllers/UserController.php

Lines changed: 0 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -18,71 +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-
$hasPassword = $request->get('password');
67-
$user->update(
68-
$request->merge([
69-
'password' => Hash::make($request->get('password'))
70-
])->except([$hasPassword ? '' : 'password'])
71-
);
72-
73-
return redirect()->route('user.index')->withStatus(__('User successfully updated.'));
74-
}
75-
76-
/**
77-
* Remove the specified user from storage
78-
*
79-
* @param \App\User $user
80-
* @return \Illuminate\Http\RedirectResponse
81-
*/
82-
public function destroy(User $user)
83-
{
84-
$user->delete();
85-
86-
return redirect()->route('user.index')->withStatus(__('User successfully deleted.'));
87-
}
8821
}

src/now-ui-stubs/resources/views/pages/upgrade.blade.php

Lines changed: 52 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,56 @@
2424
<th class="text-center">PRO</th>
2525
</thead>
2626
<tbody>
27+
<tr>
28+
<td><h3 class="text-primary mb-0 mt-3">Laravel</h3></td>
29+
<td class="text-center"></td>
30+
<td class="text-center"></td>
31+
</tr>
32+
<tr>
33+
<td>Login, Register, Forgot password pages</td>
34+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
35+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
36+
</tr>
37+
<tr>
38+
<td>User profile</td>
39+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
40+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
41+
</tr>
42+
<tr>
43+
<td>Users management</td>
44+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
45+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
46+
</tr>
47+
<tr>
48+
<td>User roles management </td>
49+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
50+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
51+
</tr>
52+
<tr>
53+
<td>Items management </td>
54+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
55+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
56+
</tr>
57+
<tr>
58+
<td>Categories management, Tags management </td>
59+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
60+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
61+
</tr>
62+
<tr>
63+
<td>Image upload, date picker inputs</td>
64+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
65+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
66+
</tr>
67+
<tr>
68+
<td>Radio button, checkbox, toggle inputs</td>
69+
<td class="text-center"><i class="fa fa-times text-danger"></i></td>
70+
<td class="text-center"><i class="fa fa-check text-success"></i></td>
71+
</tr>
72+
<tr>
73+
<td><h3 class="text-primary mb-0 mt-3">Frontend</h3></td>
74+
<td class="text-center"></td>
75+
<td class="text-center"></td>
76+
</tr>
2777
<tr>
2878
<td>Components</td>
2979
<td class="text-center">16</td>
@@ -62,7 +112,7 @@
62112
<tr>
63113
<td></td>
64114
<td class="text-center">Free</td>
65-
<td class="text-center">Just $49</td>
115+
<td class="text-center">Just $149</td>
66116
</tr>
67117
<tr>
68118
<td class="text-center"></td>
@@ -81,4 +131,4 @@
81131
</div>
82132
</div>
83133
</div>
84-
@endsection
134+
@endsection

src/now-ui-stubs/resources/views/users/create.blade.php

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

src/now-ui-stubs/resources/views/users/edit.blade.php

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

0 commit comments

Comments
 (0)