aarchila / now-ui-dashboard

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

version license GitHub issues open GitHub issues closed

Frontend version: Now UI Dashboard v1.4.1. More info at https://www.creative-tim.com/product/now-ui-dashboard/?ref=ndl-readme

Product Image

Speed up your web development with the Bootstrap 4 Admin Dashboard built for Laravel Framework 5.5 and up.

Prerequisites

If you don't already have an Apache local environment with PHP and MySQL, use one of the following links:

Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md

And Laravel: https://laravel.com/docs/6.x/installation

Installation

After initializing a fresh instance of Laravel (and making all the necessary configurations), install the preset using one of the provided methods:

Via composer

  1. Cd to your Laravel app
  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.
  3. Run php artisan preset nowui command to install the Argon 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 (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
  4. In your terminal run composer dump-autoload
  5. Run php artisan migrate --seed to create basic users table

By using the archive

  1. In your application's root create a presets folder
  2. Download an archive of the repo and unzip it
  3. Copy and paste now-ui-master folder in presets (created in step 2) and rename it to NowUi
  4. Open composer.json file
  5. Add "LaravelFrontendPresets\\NowUiPreset\\": "presets/NowUi/src" to autoload/psr-4 and to autoload-dev/psr-4
  6. Add LaravelFrontendPresets\NowUiPreset\NowUiPresetServiceProvider::class to config/app.php file
  7. In your terminal run composer dump-autoload
  8. Run php artisan preset nowui command to install the Argon 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 (NOTE: If you run this command several times, be sure to clean up the duplicate Auth entries in routes/web.php)
  9. Run php artisan migrate --seed to create basic users table

Usage

To start testing the theme, register as a user or log in using one of the default users:

Make sure to run the migrations and seeders for the above credentials to be available.

In addition to the features included in the free preset, the Pro theme also has a role management example with an updated user management, as well as tag management, category management and item management examples. 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 the features can be viewed once you log in using the credentials provided above or by registering your own user.

Dashboard

You can access the dashboard either by using the "Dashboards/Dashboard" link in the left sidebar or by adding /home in the URL.

Profile edit

You have the option to edit the current logged in user's profile information (name, email, profile picture) and password. To access this page, just click the "Examples/Profile" link in the left sidebar or add /profile in the URL.

The App\Htttp\Controlers\ProfileController handles the update of the user information and password.

public function update(ProfileRequest $request)
    {
        auth()->user()->update(
            $request->merge(['picture' => $request->photo ? $request->photo->store('profile', 'public') : null])
                ->except([$request->hasFile('photo') ? '' : 'picture'])
        );

        return back()->withStatus(__('Profile successfully updated.'));
    }

/**
* Change the password
*
* @param  \App\Http\Requests\PasswordRequest  $request
* @return \Illuminate\Http\RedirectResponse
*/
public function password(PasswordRequest $request)
{
    auth()->user()->update(['password' => Hash::make($request->get('password'))]);

    return back()->withStatus(__('Password successfully updated.'));
}

If you input the wrong data when editing the profile, dont worry. Validation rules have been added to prevent this (see App\Http\Requests\ProfileRequest). If you try to change the password, you will see that additional validation rules have been added in App\Http\Requests\PasswordRequest. You also have a custom validation rule that can be found in App\Rules\CurrentPasswordCheckRule`.

public function rules()
{
    return [
        'old_password' => ['required', 'min:6', new CurrentPasswordCheckRule],
        'password' => ['required', 'min:6', 'confirmed', 'different:old_password'],
        'password_confirmation' => ['required', 'min:6'],
    ];
}

User management

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. 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:

<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
    <label class="form-control-label" for="input-name">{{ __('Name') }}</label>
    <input type="text" name="name" id="input-name" class="form-control{{ $errors->has('name') ? ' is-invalid' : '' }}" placeholder="{{ __('Name') }}" value="{{ old('name') }}" required autofocus>
    @include('alerts.feedback', ['field' => 'name'])
</div>

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.

public function rules()
{
    return [
        'name' => [
            'required', 'min:3'
        ],
        'email' => [
            'required', 'email', Rule::unique((new User)->getTable())->ignore($this->route()->user->id ?? null)
        ],
        'password' => [
            $this->route()->user ? 'nullable' : 'required', 'confirmed', 'min:6'
        ]
    ];
}

The policy which authorizes the user to access the user management pages is implemented in App\Policies\UserPolicy.php.``

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).

All the sample code for the user management can be found in App\Http\Controllers\UserController. See store method example bellow:

public function store(UserRequest $request, User $model)
{
    $model->create($request->merge([
        'picture' => $request->photo ? $request->photo->store('profile', 'public') : null,
        'password' => Hash::make($request->get('password'))
    ])->all());

    return redirect()->route('user.index')->withStatus(__('User successfully created.'));
}

Table of Contents

Versions

HTML LARAVEL
now-ui Dashboard HTML now-ui Dashboard Laravel

Demo

Login Dashboard
Login Dashboard
Profile Page Users Page
Profile Page Users Page
View More

Documentation

The documentation for the now-ui Dashboard Laravel is hosted at our website.

File Structure

├── changelog.md
├── composer.json
├── docs
│   └── documentation.html
├── .git
│   ├── branches
│   ├── COMMIT_EDITMSG
│   ├── config
│   ├── description
│   ├── HEAD
│   ├── hooks
│   │   ├── applypatch-msg.sample
│   │   ├── commit-msg.sample
│   │   ├── fsmonitor-watchman.sample
│   │   ├── post-update.sample
│   │   ├── pre-applypatch.sample
│   │   ├── pre-commit.sample
│   │   ├── prepare-commit-msg.sample
│   │   ├── pre-push.sample
│   │   ├── pre-rebase.sample
│   │   ├── pre-receive.sample
│   │   └── update.sample
│   ├── index
│   ├── info
│   │   └── exclude
│   ├── logs
│   │   ├── HEAD
│   │   └── refs
│   │       ├── heads
│   │       │   ├── develop
│   │       │   └── master
│   │       └── remotes
│   │           └── origin
│   │               └── develop
│   ├── objects
│   └── refs
│       ├── heads
│       │   ├── develop
│       │   └── master
│       ├── remotes
│       │   └── origin
│       │       └── develop
│       └── tags
├── license.md
├── README.md
├── screens
│   ├── Dashboard.png
│   ├── login.png
│   ├── Profile.png
│   └── Users.png
├── src
│   ├── NowUiPreset.php
│   ├── NowUIPresetServiceProvider.php
│   └── now-ui-stubs
│       ├── app
│       │   ├── Console
│       │   │   ├── comments
│       │   │   │   └── DeleteOldUsers.php
│       │   │   └── Kernel.php
│       │   ├── Exceptions
│       │   │   └── Handler.php
│       │   ├── Http
│       │   │   ├── Controllers
│       │   │   │   ├── Auth
│       │   │   │   │   ├── ForgotPasswordController.php
│       │   │   │   │   ├── LoginController.php
│       │   │   │   │   ├── RegisterController.php
│       │   │   │   │   ├── ResetPasswordController.php
│       │   │   │   │   └── VerificationController.php
│       │   │   │   ├── Controller.php
│       │   │   │   ├── HomeController.php
│       │   │   │   ├── PageController.php
│       │   │   │   ├── ProfileController.php
│       │   │   │   └── UserController.php
│       │   │   ├── Kernel.php
│       │   │   ├── Middleware
│       │   │   │   ├── Authenticate.php
│       │   │   │   ├── CheckForMaintenanceMode.php
│       │   │   │   ├── EncryptCookies.php
│       │   │   │   ├── RedirectIfAuthenticated.php
│       │   │   │   ├── TrimStrings.php
│       │   │   │   ├── TrustProxies.php
│       │   │   │   └── VerifyCsrfToken.php
│       │   │   └── Requests
│       │   │       ├── CategoryRequest.php
│       │   │       ├── ItemRequest.php
│       │   │       ├── PasswordRequest.php
│       │   │       ├── ProfileRequest.php
│       │   │       ├── TagRequest.php
│       │   │       └── UserRequest.php
│       │   ├── Observers
│       │   │   └── UserObserver.php
│       │   ├── Policies
│       │   │   └── UserPolicy.php
│       │   ├── Providers
│       │   │   ├── AppServiceProvider.php
│       │   │   ├── AuthServiceProvider.php
│       │   │   ├── BroadcastServiceProvider.php
│       │   │   ├── EventServiceProvider.php
│       │   │   └── RouteServiceProvider.php
│       │   ├── Rules
│       │   │   └── CurrentPasswordCheckRule.php
│       │   └── User.php
│       ├── database
│       │   ├── factories
│       │   │   └── UserFactory.php
│       │   ├── .gitignore
│       │   ├── migrations
│       │   │   ├── 2014_10_12_100000_create_password_resets_table.php
│       │   │   └── 2019_01_15_110000_create_users_table.php
│       │   └── seeds
│       │       ├── DatabaseSeeder.php
│       │       └── UsersTableSeeder.php
│       └── resources
│           ├── assets
│           │   ├── css
│           │   │   ├── bootstrap.min.css
│           │   │   ├── bootstrap.min.css.map
│           │   │   ├── now-ui-dashboard.css
│           │   │   ├── now-ui-dashboard.css.map
│           │   │   └── now-ui-dashboard.min.css
│           │   ├── demo
│           │   │   ├── demo.css
│           │   │   └── demo.js
│           │   ├── fonts
│           │   │   ├── nucleo-license.md
│           │   │   ├── nucleo-outline.eot
│           │   │   ├── nucleo-outline.ttf
│           │   │   ├── nucleo-outline.woff
│           │   │   └── nucleo-outline.woff2
│           │   ├── img
│           │   │   ├── apple-icon.png
│           │   │   ├── bg14.jpg
│           │   │   ├── bg16.jpg
│           │   │   ├── bg5.jpg
│           │   │   ├── default-avatar.png
│           │   │   ├── favicon.png
│           │   │   ├── header.jpg
│           │   │   ├── mike.jpg
│           │   │   ├── now-logo.png
│           │   │   └── now-ui-dashboard.gif
│           │   ├── js
│           │   │   ├── core
│           │   │   │   ├── bootstrap.min.js
│           │   │   │   ├── jquery.min.js
│           │   │   │   └── popper.min.js
│           │   │   ├── now-ui-dashboard.js
│           │   │   ├── now-ui-dashboard.js.map
│           │   │   ├── now-ui-dashboard.min.js
│           │   │   └── plugins
│           │   │       ├── bootstrap-notify.js
│           │   │       ├── chartjs.min.js
│           │   │       └── perfect-scrollbar.jquery.min.js
│           │   └── scss
│           │       ├── now-ui-dashboard
│           │       │   ├── _alerts.scss
│           │       │   ├── _buttons.scss
│           │       │   ├── cards
│           │       │   │   ├── _card-chart.scss
│           │       │   │   ├── _card-map.scss
│           │       │   │   ├── _card-plain.scss
│           │       │   │   └── _card-user.scss
│           │       │   ├── _cards.scss
│           │       │   ├── _checkboxes-radio.scss
│           │       │   ├── _dropdown.scss
│           │       │   ├── _fixed-plugin.scss
│           │       │   ├── _footers.scss
│           │       │   ├── _images.scss
│           │       │   ├── _inputs.scss
│           │       │   ├── _misc.scss
│           │       │   ├── mixins
│           │       │   │   ├── _buttons.scss
│           │       │   │   ├── _cards.scss
│           │       │   │   ├── _dropdown.scss
│           │       │   │   ├── _inputs.scss
│           │       │   │   ├── _page-header.scss
│           │       │   │   ├── _sidebar.scss
│           │       │   │   ├── _transparency.scss
│           │       │   │   └── _vendor-prefixes.scss
│           │       │   ├── _mixins.scss
│           │       │   ├── _navbar.scss
│           │       │   ├── _nucleo-outline.scss
│           │       │   ├── _page-header.scss
│           │       │   ├── plugins
│           │       │   │   ├── _plugin-animate-bootstrap-notify.scss
│           │       │   │   └── _plugin-perfect-scrollbar.scss
│           │       │   ├── _responsive.scss
│           │       │   ├── _sidebar-and-main-panel.scss
│           │       │   ├── _tables.scss
│           │       │   ├── _typography.scss
│           │       │   └── _variables.scss
│           │       └── now-ui-dashboard.scss
│           ├── js
│           │   ├── app.js
│           │   ├── bootstrap.js
│           │   └── components
│           │       └── ExampleComponent.vue
│           ├── lang
│           │   └── en
│           │       ├── auth.php
│           │       ├── pagination.php
│           │       ├── passwords.php
│           │       └── validation.php
│           ├── sass
│           │   ├── app.scss
│           │   └── _variables.scss
│           └── views
│               ├── alerts
│               │   ├── errors.blade.php
│               │   ├── error_self_update.blade.php
│               │   ├── feedback.blade.php
│               │   ├── migrations_check.blade.php
│               │   └── success.blade.php
│               ├── auth
│               │   ├── login.blade.php
│               │   ├── passwords
│               │   │   ├── email.blade.php
│               │   │   └── reset.blade.php
│               │   ├── register.blade.php
│               │   └── verify.blade.php
│               ├── home.blade.php
│               ├── layouts
│               │   ├── app.blade.php
│               │   ├── footer.blade.php
│               │   ├── navbars
│               │   │   ├── navs
│               │   │   │   ├── auth.blade.php
│               │   │   │   └── guest.blade.php
│               │   │   └── sidebar.blade.php
│               │   └── page_template
│               │       ├── auth.blade.php
│               │       └── guest.blade.php
│               ├── pages
│               │   ├── icons.blade.php
│               │   ├── maps.blade.php
│               │   ├── notifications.blade.php
│               │   ├── table.blade.php
│               │   ├── typography.blade.php
│               │   └── upgrade.blade.php
│               ├── profile
│               │   └── edit.blade.php
│               ├── users
│               │   ├── create.blade.php
│               │   ├── edit.blade.php
│               │   └── index.blade.php
│               └── welcome.blade.php
└── .vscode
    └── settings.json

Browser Support

At present, we officially aim to support the last two versions of the following browsers:

Resources

HTML LARAVEL
now-ui Dashboard HTML now-ui Dashboard Laravel

Change log

Please see the changelog for more information on what has changed recently.

Credits

Reporting Issues

We use GitHub Issues as the official bug tracker for the now-ui Dashboard Laravel. Here are some advices for our users that want to report an issue:

  1. Make sure that you are using the latest version of the now-ui Dashboard Laravel. Check the CHANGELOG from your dashboard on our website.
  2. Providing us reproducible steps for the issue will shorten the time it takes for it to be fixed.
  3. Some issues may be browser specific, so specifying in what browser you encountered the issue might help.

Licensing

Useful Links

Social Media

Creative Tim:

Twitter: https://twitter.com/CreativeTim?ref=ndl-readme

Facebook: https://www.facebook.com/CreativeTim?ref=ndl-readme

Dribbble: https://dribbble.com/creativetim?ref=ndl-readme

Instagram: https://www.instagram.com/CreativeTimOfficial?ref=ndl-readme

Updivision:

Twitter: https://twitter.com/updivision?ref=ndl-readme

Facebook: https://www.facebook.com/updivision?ref=ndl-readme

Linkedin: https://www.linkedin.com/company/updivision?ref=ndl-readme

Updivision Blog: https://updivision.com/blog/?ref=ndl-readme

Credits

About

License:MIT License


Languages

Language:CSS 66.2%Language:HTML 19.6%Language:JavaScript 11.7%Language:PHP 2.4%