Skip to content

Commit c69b68b

Browse files
Free version
1 parent 94533e8 commit c69b68b

File tree

117 files changed

+6674
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

117 files changed

+6674
-0
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": "#093048",
4+
"titleBar.activeBackground": "#0C4465",
5+
"titleBar.activeForeground": "#F6FBFE"
6+
}
7+
}

changelog.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Changelog
2+
3+
All notable changes to `Now Ui` frontend preset for Laravel will be documented in this file.
4+
5+
## Version 1.0.0
6+
7+
### Added
8+
- Now Ui v1.0.0 frontend theme
9+
- Laravel Auth preset
10+
- Change user profile
11+
- User CRUD
12+
13+
## Version 1.0.1 - 1.0.4
14+
- Bugfixes
15+
16+
## Version 1.0.5 - 1.0.6
17+
- More flexible password setting
18+
19+
## Version 1.0.7 - 1.0.10
20+
- Menu structure changes, replace texts

composer.json

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{
2+
"name": "laravel/laravel",
3+
"type": "project",
4+
"description": "The Laravel Framework.",
5+
"keywords": [
6+
"framework",
7+
"laravel"
8+
],
9+
"license": "MIT",
10+
"require": {
11+
"php": "^7.1.3",
12+
"fideloper/proxy": "^4.0",
13+
"laravel/framework": "5.8.*",
14+
"laravel/tinker": "^1.0"
15+
},
16+
"require-dev": {
17+
"beyondcode/laravel-dump-server": "^1.0",
18+
"filp/whoops": "^2.0",
19+
"fzaninotto/faker": "^1.4",
20+
"mockery/mockery": "^1.0",
21+
"nunomaduro/collision": "^3.0",
22+
"phpunit/phpunit": "^7.5"
23+
},
24+
"config": {
25+
"optimize-autoloader": true,
26+
"preferred-install": "dist",
27+
"sort-packages": true
28+
},
29+
"extra": {
30+
"laravel": {
31+
"dont-discover": []
32+
}
33+
},
34+
"autoload": {
35+
"psr-4": {
36+
"App\\": "app/"
37+
},
38+
"classmap": [
39+
"database/seeds",
40+
"database/factories"
41+
]
42+
},
43+
"autoload-dev": {
44+
"psr-4": {
45+
"Tests\\": "tests/"
46+
}
47+
},
48+
"minimum-stability": "dev",
49+
"prefer-stable": true,
50+
"scripts": {
51+
"post-autoload-dump": [
52+
"Illuminate\\Foundation\\ComposerScripts::postAutoloadDump",
53+
"@php artisan package:discover --ansi"
54+
],
55+
"post-root-package-install": [
56+
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
57+
],
58+
"post-create-project-cmd": [
59+
"@php artisan key:generate --ansi"
60+
]
61+
}
62+
}

docs/documentation.html

Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8" />
6+
<link rel="apple-touch-icon" sizes="76x76" href="../assets/img/apple-icon.png">
7+
<link rel="icon" type="image/png" href="../assets/img/favicon.png">
8+
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
9+
<title>
10+
Components Documentation - Now UI Dashboard by Creative Tim
11+
</title>
12+
<meta content='width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0, shrink-to-fit=no' name='viewport' />
13+
<!-- Fonts and icons -->
14+
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700,200" rel="stylesheet" />
15+
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.7.1/css/all.css" integrity="sha384-fnmOCqbTlWIlj8LyTjo7mOUStjsKC4pOpQbqyi7RrhN7udi9RwhKkMHpvLbHG9Sr" crossorigin="anonymous">
16+
<!-- CSS Files -->
17+
<link href="../assets/css/bootstrap.min.css" rel="stylesheet" />
18+
<link href="../assets/css/now-ui-dashboard.css?v=1.3.0" rel="stylesheet" />
19+
<!-- CSS Just for demo purpose, don't include it in your project -->
20+
<link href="../assets/demo/demo.css" rel="stylesheet" />
21+
</head>
22+
23+
<body class="offline-doc">
24+
<!-- Navbar -->
25+
<nav class="navbar navbar-expand-lg navbar-transparent bg-primary navbar-absolute">
26+
<div class="container">
27+
<div class="navbar-wrapper">
28+
<div class="navbar-toggle">
29+
<button type="button" class="navbar-toggler">
30+
<span class="navbar-toggler-bar bar1"></span>
31+
<span class="navbar-toggler-bar bar2"></span>
32+
<span class="navbar-toggler-bar bar3"></span>
33+
</button>
34+
</div>
35+
<a class="navbar-brand" href="#pablo">Now UI Dashboard</a>
36+
</div>
37+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navigation" aria-controls="navigation-index" aria-expanded="false" aria-label="Toggle navigation">
38+
<span class="navbar-toggler-bar navbar-kebab"></span>
39+
<span class="navbar-toggler-bar navbar-kebab"></span>
40+
<span class="navbar-toggler-bar navbar-kebab"></span>
41+
</button>
42+
<div class="collapse navbar-collapse justify-content-end" id="navigation">
43+
<ul class="navbar-nav">
44+
<li class="nav-item">
45+
<a class="nav-link" href="../examples/dashboard.html">
46+
Back to Dashboard
47+
</a>
48+
</li>
49+
<li class="nav-item">
50+
<a class="nav-link" href="https://github.com/creativetimofficial/now-ui-dashboard/issues" target="_blank">
51+
Have an issue?
52+
</a>
53+
</li>
54+
</ul>
55+
</div>
56+
</div>
57+
</nav>
58+
<!-- End Navbar -->
59+
<div class="page-header clear-filter" filter-color="orange">
60+
<div class="page-header-image" style="background-image: url('../assets/img/header.jpg');"></div>
61+
<div class="container text-center">
62+
<div class="col-md-8 ml-auto mr-auto">
63+
<div class="brand">
64+
<h1 class="title">
65+
Now UI Dashboard
66+
</h1>
67+
<h3 class="description">Documentation v1.3.0</h3>
68+
<br/>
69+
<a href="https://demos.creative-tim.com/now-ui-dashboard/docs/1.0/getting-started/introduction.html" class="btn btn-primary btn-round btn-lg">View documentation</a>
70+
</div>
71+
</div>
72+
</div>
73+
</div>
74+
<footer class="footer">
75+
<div class="container-fluid">
76+
<nav>
77+
<ul>
78+
<li>
79+
<a href="https://www.creative-tim.com">
80+
Creative Tim
81+
</a>
82+
</li>
83+
<li>
84+
<a href="http://presentation.creative-tim.com">
85+
About Us
86+
</a>
87+
</li>
88+
<li>
89+
<a href="http://blog.creative-tim.com">
90+
Blog
91+
</a>
92+
</li>
93+
</ul>
94+
</nav>
95+
<div class="copyright" id="copyright">
96+
&copy;
97+
<script>
98+
document.getElementById('copyright').appendChild(document.createTextNode(new Date().getFullYear()))
99+
</script>, Designed by
100+
<a href="https://www.invisionapp.com" target="_blank">Invision</a>. Coded by
101+
<a href="https://www.creative-tim.com" target="_blank">Creative Tim</a>.
102+
</div>
103+
</div>
104+
</footer>
105+
<!-- Core JS Files -->
106+
<script src="../assets/js/core/jquery.min.js"></script>
107+
<script src="../assets/js/core/popper.min.js"></script>
108+
<script src="../assets/js/core/bootstrap.min.js"></script>
109+
<script src="../assets/js/plugins/perfect-scrollbar.jquery.min.js"></script>
110+
<!-- Google Maps Plugin -->
111+
<script src="https://maps.googleapis.com/maps/api/js?key=YOUR_KEY_HERE"></script>
112+
<!-- Chart JS -->
113+
<script src="../assets/js/plugins/chartjs.min.js"></script>
114+
<!-- Notifications Plugin -->
115+
<script src="../assets/js/plugins/bootstrap-notify.js"></script>
116+
<!-- Control Center for Now Ui Dashboard: parallax effects, scripts for the example pages etc -->
117+
<script src="../assets/js/now-ui-dashboard.min.js?v=1.3.0" type="text/javascript"></script>
118+
<!-- Now Ui Dashboard DEMO methods, don't include it in your project! -->
119+
<script src="../assets/demo/demo.js"></script>
120+
</body>
121+
122+
</html>

license.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
MIT License
2+
3+
Copyright (c) 2019 [Updivision](https://updivision.com) [Creative Tim](https://www.creative-tim.com)
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6+
7+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8+
9+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

readme.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Now-Ui Frontend Preset For Laravel Framework 5.5 and Up
2+
3+
Now-Ui Frontend Preset For Laravel Framework 5.5 and Up
4+
5+
*Current version*: NowUi v1.0.10. More info at https://www.creative-tim.com/product/now-ui-dashboard-laravel.
6+
7+
## Note
8+
9+
We recommend installing this preset on a project that you are starting from scratch, otherwise your project's design might break.
10+
11+
## Prerequisites
12+
13+
If you don't already have an Apache local environment with PHP and MySQL, use one of the following links:
14+
15+
- Windows: https://updivision.com/blog/post/beginner-s-guide-to-setting-up-your-local-development-environment-on-windows
16+
- Linux: https://howtoubuntu.org/how-to-install-lamp-on-ubuntu
17+
- Mac: https://wpshout.com/quick-guides/how-to-install-mamp-on-your-mac/
18+
19+
Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md
20+
And Laravel: https://laravel.com/docs/5.8/installation
21+
22+
## Installation
23+
24+
After initializing a fresh instance of Laravel (and making all the necessary configurations), install the preset using one of the provided methods:
25+
26+
### Via composer
27+
28+
1. `Cd` to your Laravel app
29+
2. Install this preset via `composer require laravel-frontend-presets/NowUi`. No need to register the service provider. Laravel 5.5 & up can auto detect the package.
30+
3. Run `php artisan preset now-ui` command to install the Now-Ui 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`
31+
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
32+
4. In your terminal run `composer dump-autoload`
33+
5. Run `php artisan migrate --seed` to create basic users table
34+
35+
### By using the archive
36+
37+
1. In your application's root create a **presets** folder
38+
2. [Download an archive](https://github.com/laravel-frontend-presets/now-ui/archive/master.zip) of the repo and unzip it
39+
3. Copy and paste **now-ui-master** folder in presets (created in step 2) and rename it to **now-ui**
40+
4. Open `composer.json` file
41+
5. Add `"LaravelFrontendPresets\\NowUiPreset\\": "presets/NowUi/src"` to `autoload/psr-4` and to `autoload-dev/psr-4`
42+
6. Add `LaravelFrontendPresets\NowUiPreset\NowUiPresetServiceProvider::class` to `config/app.php` file
43+
7. In your terminal run `composer dump-autoload`
44+
8. Run `php artisan preset now-ui` command to install the NowUi 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`
45+
(NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
46+
9. Run `php artisan migrate --seed` to create basic users table
47+
48+
49+
## Usage
50+
51+
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).
52+
53+
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.
54+
55+
### Dashboard
56+
57+
You can access the dashboard either by using the "**Dashboard**" link in the left sidebar or by adding **/home** in the url.
58+
59+
### Profile edit
60+
61+
You have the option to edit the current logged in user's profile (change name, email and password). To access this page just click the "**User profile**" link in the left sidebar or by adding **/profile** in the url.
62+
63+
The `App\Htttp\Controlers\ProfileController` handles the update of the user information.
64+
65+
```
66+
public function update(ProfileRequest $request)
67+
{
68+
auth()->user()->update($request->all());
69+
70+
return back()->withStatus(__('Profile successfully updated.'));
71+
}
72+
```
73+
74+
Also you shouldn't worry about entering wrong data in the inputs when editing the profile, validation rules were added to prevent this (see `App\Http\Requests\ProfileRequest`). If you try to change the password you will see that other validation rules were added in `App\Http\Requests\PasswordRequest`. Notice that in this file you have a custom validation rule that can be found in `App\Rules\CurrentPasswordCheckRule`.
75+
76+
```
77+
public function rules()
78+
{
79+
return [
80+
'old_password' => ['required', 'min:6', new CurrentPasswordCheckRule],
81+
'password' => ['required', 'min:6', 'confirmed', 'different:old_password'],
82+
'password_confirmation' => ['required', 'min:6'],
83+
];
84+
}
85+
```
86+
87+
### User management
88+
89+
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.
90+
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:
91+
92+
```
93+
<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
94+
<label class="form-control-label" for="input-name">{{ __('Name') }}</label>
95+
<input type="text" name="name" id="input-name" class="form-control form-control-alternative{{ $errors->has('name') ? ' is-invalid' : '' }}" placeholder="{{ __('Name') }}" value="{{ old('name') }}" required autofocus>
96+
97+
@if ($errors->has('name'))
98+
<span class="invalid-feedback" role="alert">
99+
<strong>{{ $errors->first('name') }}</strong>
100+
</span>
101+
@endif
102+
</div>
103+
```
104+
105+
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.
106+
107+
```
108+
public function rules()
109+
{
110+
return [
111+
'name' => [
112+
'required', 'min:3'
113+
],
114+
'email' => [
115+
'required', 'email', Rule::unique((new User)->getTable())->ignore($this->route()->user->id ?? null)
116+
],
117+
'password' => [
118+
$this->route()->user ? 'nullable' : 'required', 'confirmed', 'min:6'
119+
]
120+
];
121+
}
122+
```
123+
124+
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).
125+
126+
All the sample code for the user management can be found in `App\Http\Controllers\UserController`. See store method example bellow:
127+
128+
```
129+
public function store(UserRequest $request, User $model)
130+
{
131+
$model->create($request->merge(['password' => Hash::make($request->get('password'))])->all());
132+
133+
return redirect()->route('user.index')->withStatus(__('User successfully created.'));
134+
}
135+
```
136+
137+
## Change log
138+
139+
Please see the [changelog](changelog.md) for more information on what has changed recently.
140+
141+
## Credits
142+
143+
- [Creative Tim](https://creative-tim.com/)
144+
- [Updivision](https://updivision.com)
145+
146+
## License
147+
148+
[MIT License](https://github.com/laravel-frontend-presets/NowUi/blob/master/license.md).
149+
150+
## Screen shots
151+
152+
![NowUi Login](/screens/Login.png)
153+
154+
![NowUi Dashboard](/screens/Dashboard.png)
155+
156+
![NowUi Users](/screens/Users.png)
157+
158+
![NowUi Profile](/screens/Profile.png)

screens/Dashboard.png

329 KB
Loading

screens/Profile.png

227 KB
Loading

screens/Users.png

163 KB
Loading

screens/login.png

2.14 MB
Loading

0 commit comments

Comments
 (0)