Material Dashboard Laravel - Free Frontend Preset for Laravel

Material Dashboard Laravel version-badge license-badge

alt text

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

Note

We recommend installing this preset on a project that you are starting from scratch, otherwise your project's design might break.

Prerequisites

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

Windows: https://updivision.com/blog/post/beginner-s-guide-to-setting-up-your-local-development-environment-on-windows
Linux: https://howtoubuntu.org/how-to-install-lamp-on-ubuntu
Mac: https://wpshout.com/quick-guides/how-to-install-mamp-on-your-mac/
Also, you will need to install Composer: https://getcomposer.org/doc/00-intro.md
And Laravel: https://laravel.com/docs/5.8/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

Cd to your Laravel app
Install this preset via composer require laravel-frontend-presets/material-dashboard. No need to register the service provider. Laravel 5.5 & up can auto detect the package.
Run php artisan preset material 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)
In your terminal run composer dump-autoload
Run php artisan migrate --seed to create basic users table

By using the archive

In your application's root create a presets folder
Download an archive of the repo and unzip it
Copy and paste material-dashboard-master folder in presets (created in step 2) and rename it to material
Open composer.json file
Add "LaravelFrontendPresets\MaterialPreset\": "presets/material/src" to autoload/psr-4 and to autoload-dev/psr-4
Add LaravelFrontendPresets\MaterialPreset\MaterialPresetServiceProvider::class to config/app.php file
In your terminal run composer dump-autoload
Run php artisan preset material command to install the Material 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)
Run php artisan migrate --seed to create basic users table

Usage

Register a user or login using admin@material.com and secret and start testing the preset (make sure to run the migrations and seeders for these credentials to be available).

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.

Dashboard

You can access the dashboard either by using the "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 (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.

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

public function update(ProfileRequest $request)
{
auth()->user()->update($request->all());

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

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

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

{{ __('Name') }}

  @if ($errors->has('name'))
    {{ $errors->first('name') }}
  @endif

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.

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'
]
];
}
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).

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(['password' => Hash::make($request->get('password'))])->all());

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

}

Resources

Demo: https://material-dashboard-laravel.creative-tim.com/?ref=tq&affiliate_id=97705
Download Page: https://www.creative-tim.com/product/material-dashboard-laravel?ref=tq&affiliate_id=97705
Documentation: https://material-dashboard-laravel.creative-tim.com/docs/getting-started/laravel-setup.html?ref=tq&affiliate_id=97705
License Agreement: https://www.creative-tim.com/license
Support: https://www.creative-tim.com/contact-us
Issues: Github Issues Page

Useful Links

Tutorials
Affiliate Program (earn money)
Blog Creative Tim
Free Products from Creative Tim
Premium Products from Creative Tim
React Products from Creative Tim
Angular Products from Creative Tim
VueJS Products from Creative Tim
More products from Creative Tim
Check our Bundles here

Social Media

Twitter: https://twitter.com/CreativeTim

Facebook: https://www.facebook.com/CreativeTim

Dribbble: https://dribbble.com/creativetim

Instagram: https://www.instagram.com/CreativeTimOfficial

More Themes by This Author

BLK• Design System - Free Design System for Bootstrap 4
B Bootstrap 4
Argon Design System - Free Design System for Bootstrap 4
B Bootstrap 4
You must register or login first to buy this template.
Login to download

Select License Details

Looking for premium themes? Visit Theme Quarry.
Item Details
Category Free
Released 1 month ago
Version v1.0.0
Updated 1 month ago
Uses LESS No
Uses SASS No
CSS Framework Bootstrap 4
Compatibility
  • IE10
  • IE11
  • Latest Edge
  • Latest Chrome
  • Latest Safari
  • Latest FireFox
  • Latest Opera
Tags material, laravel, dashboard, responsive
Exclusivity Non-exclusive to AS Marketplace
Sales

74

Theme Author

Creative Tim

Signed up on Nov 26, 2016
Similar Theme
Admiry - Responsive Bootstrap 4 Admin Dashboard
B Bootstrap 4

We are transferring you to PayPal to complete your payment

Please Wait