Frontend version: Material Dashboard v3.0.1. More info at https://www.creative-tim.com/product/material-dashboard-pro
Material Dashboard PRO Laravel combines hundreds of premium Bootstrap 5 frontend components with an out of the box Laravel backend. In short, it's the ultimate fullstack resource we coded with UPDIVISION to help developers build complex apps faster.
The backend is fully integrated, meaning you can easily tick all the boxes for a fully-functional admin panel for your custom application. You have hundreds of UI components to choose from, which you can easily edit using Sass files and classes. In short, everything you need so that your app looks like you want it to look and does what you want it to do.
Check out the open-source demo version for a taste of what Material Dashboard PRO Laravel has to offer.
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/10.x
composer install
.env.example
to .env
and updated the configurations (mainly the database configuration)php artisan key:generate
php artisan migrate --seed
to create the database tables and seed the roles and users tablesphp artisan storage:link
to create the storage symlink (if you are using Vagrant with Homestead for development, remember to ssh into your virtual machine and run the command from there).Register a user or login with the default users with different roles from your database and start testing (make sure to run the migrations and seeders for these credentials to be available):
Besides the numerous types of dashboard, you can find pages for editing your profile, pages for managing the users, the roles, the items, the categories and the tags. There are also static pages for profile, for users, for projects, for accounts, for various applications, for ecommerce and different styles of pages for authentication. All the necessary files 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 or by registering your own user.
HTML | Laravel |
---|---|
Vue | React |
---|---|
Register | Login |
---|---|
Forgot Password Page | Reset Password Page |
---|---|
Dashboard | Virtual Reality |
---|---|
Profile Page | User Management |
---|---|
Role Management | Item Management |
---|---|
Category Management | Tag Management |
---|---|
The documentation for the Material Dashboard Laravel is hosted at our website.
If you are not logged in you can only access this page or the Sign Up page. The default url takes you to the login page where you use the default credentials admin@material.com with the password secret but you can change them with the credentials for creator and for member. Logging in is possible only with already existing credentials. For this to work you should have run the migrations. The user also has the option to choose if he wants to be remembered or not.
The App/Http/Controllers/SessionsController.php
handles the logging in of an existing user.
public function store()
{
$attributes = request()->validate([
'email' => 'required|email',
'password' => 'required'
]);
if (! auth()->attempt($attributes)) {
throw ValidationException::withMessages([
'email' => 'Your provided credentials could not be verified.'
]);
}
session()->regenerate();
return redirect('/dashboard');
}
You can register as a user by filling in the name, email, role and password for your account. For your role you can choose between the Admin, Creator and Member. It is important to know that an admin user has access to all the pages and actions, can delete, add and edit another users, other roles, items, tags or categories; a creator user has acces to category, tag and item management, but can not add, edit or delete other users; a member user has access to the item management but can not take any actions. You can do this by accessing the sign up page from the "Sign Up" button in the top navbar or by clicking the "Sign Up" button from the bottom of the log in form. Another simple way is adding /sign-up in the url.
The App/Http/Controllers/RegisterController.php
handles the registration of a new user.
public function store(){
$attributes = request()->validate([
'name' => 'required|max:255|unique:users,name',
'email' => 'required|email|max:255|unique:users,email',
'password' => 'required|min:7|max:255',
'role_id'=>'required'
]);
$user = User::create($attributes);
auth()->login($user);
return redirect('/dashboard');
}
If a user forgets the account's password it is possible to reset the password. For this the user should click on the "here" under the login form.
The App/Http/Controllers/SessionsController.php
takes care of sending an email to the user where he can reset the password afterwards.
public function show(){
request()->validate([
'email' => 'required|email',
]);
$status = Password::sendResetLink(
request()->only('email')
);
return $status === Password::RESET_LINK_SENT
? back()->with(['status' => __($status)])
: back()->withErrors(['email' => __($status)]);
}
The user who forgot the password gets an email on the account's email address. The user can access the reset password page by clicking the button found in the email. The link for resetting the password is available for 12 hours. The user must add the new password and confirm the password for his password to be updated. The user is redirected to the login page.
The App/Http/Controllers/SessionsController.php
helps the user reset the password.
public function update(){
request()->validate([
'token' => 'required',
'email' => 'required|email',
'password' => 'required|min:8|confirmed',
]);
$status = Password::reset(
request()->only('email', 'password', 'password_confirmation', 'token'),
function ($user, $password) {
$user->forceFill([
'password' => ($password)
])->setRememberToken(Str::random(60));
$user->save();
event(new PasswordReset($user));
}
);
return $status === Password::PASSWORD_RESET
? redirect()->route('login')->with('status', __($status))
: back()->withErrors(['email' => [__($status)]]);
}
The profile can be accessed by a logged in user by clicking "User Profile" from the sidebar or adding /user-profile in the url. The user can add information like phone number, location or change name, email and password.
The App/Http/Controllers/UserController.php
handles the user's profile information.
public function passwordUpdate(){
request()->validate([
'old_password' => 'required',
'password' => 'required|min:7|confirmed',
]);
$hashedPassword = auth()->user()->password;
if (Hash::check(request()->old_password , $hashedPassword)) {
if (!Hash::check(request()->password , $hashedPassword))
{
$users = User::findorFail(auth()->user()->id);
$users->password = request()->password;
$users->save();
return back()->with(['success'=>'Password successfully updated.']);
}
else{
return back()->with(['error' =>"New password can not be the old password!"]);
}
}
else{
return back()->with(['error' =>"Old password doesn't match"]);
}
}
The user management can be accessed by clicking "User Management" from the Laravel Examples section from the sidebar or by adding "/users-management in the url. This page is available for users with the Admin role and the user is able to add, edit and delete other users. For adding a new user you can press the "+ Add User". If you would like to edit or delete an user you can click on the Action column. It is also possible to sort the fields or to search in the fields.
On the page for adding a new user you will find a form which allows you to fill the information. All pages are generated using blade templates.
The App/Http/Controllers/UserManagementController.php
takes care of data validation and creating the new user:
public function store(){
$attributes = request()->validate([
'email' => 'required|unique:users,email',
'name' =>'required|',
'password' => 'required|confirmed|min:7',
'picture' => 'required|mimes:jpg,jpeg,png,bmp,tiff |max:4096',
'role_id' => 'required|exists:roles,id',
]);
$path = request()->picture->store('profile', 'public');
$attributes['picture'] = "$path";
User::create($attributes);
return redirect('users-management')->withStatus('User successfully created.');
}
Once the user pressed Send at the end of the form the new user is added to the table.
For authorizing this actions have been used policies such as App\Policies\UserPolicy
:
/**
* Determine whether the authenticate user can manage other users.
*/
public function manageUsers(User $user)
{
return $user->isAdmin();
}
The PRO version lets you add roles to the user. The default roles are Admin, Creator and Member. The role management can be accessed by clicking "Role Management" from the Laravel Examples section of the sidebar or by adding "/roles in the url. This page is available for users with the Admin role and the user is able to add, edit and delete roles. For adding a new role you can press the "+ Add Role" button. If you would like to edit or delete a role you can click on the Action column. It is also possible to sort the fields or to search in the fields.
On the page for adding a new role you will find a form which allows you to fill the name and the description of the new role.
The App/Http/Controllers/RolesController.php
takes care of data validation and creation of a the new role:
public function store(){
$attributes = request()->validate([
'name' => 'required|max:255|unique:roles,name',
'description' =>'required|min:5',
]);
Role::create($attributes);
return redirect('roles')->withStatus('Role successfully created.');
}
The theme has some default categories but an Admin or Creator user can manage these categories.The category management can be accessed by clicking "Category Management" from the Laravel Examples section of the sidebar or by adding "/category in the url. The authenticated user can add, edit and delete categories. For adding a new category you can press the "+ Add Category" button. If you would like to edit or delete a category you can click on the Action column. It is also possible to sort the fields or to search in the fields.
On the page for adding a new category you will find a form which allows you to fill the name and the description of the new category.
The App/Http/Controllers/CategoryController.php
takes care of data validation when changing a category and updating it:
public function update($id){
request()->validate([
'name' => 'required|max:255|unique:categories,name,'.$id,
'description' =>'required|min:5',
]);
Category::find($id)->update(request()->all());
return redirect('category')->withStatus('Category successfully updated.');
}
The theme has some default tags but an Admin or Creator user can manage these tags.The tag management can be accessed by clicking "Tag Managmenet" from the Laravel Examples section from the sidebar or by adding "/tag in the url. The authenticated user can add, edit and delete tags. For adding a new tag you can press the "+ Add Tag" button. If you would like to edit or delete a tag you can click on the Action column. It is also possible to sort the fields or to search in the fields.
On the page for adding a new category you will find a form which allows you to fill the name and the description of the new tag and on the edit page you will find a similar form for the changes you wish to make.
The /resources/views/laravel-examples/tag/edit.blade.php
is the blade template for editing a tag:
@error('color')
<p class='text-danger'>{{ $message }} </p>
@enderror
<div class="form-group col-12 mt-2 col-md-6">
<label for="exampleColorInput" class="form-label">Color picker</label>
<input type="color" name='color' class="form-control form-control-color" id="exampleColorInput" value="{{ old('color', $tag->color) }}">
</div>
Item Management is the most advanced example included in the PRO theme because every item has a picture, has a category and has multiple tags. The item management can be accessed by clicking "Item Management" from the Laravel Examples section of the sidebar or by adding "/items in the url. The authenticated user as an Admin or Creator can add, edit and delete items. For adding a new item you can press the "+ Add Item" button. If you would like to edit or delete an item you can click on the Action column. It is also possible to sort the fields or to search in the fields. The Member user can not take any actions on the item, he is only able to see the item management table.
On the page for adding a new item you will find a form which allows you to add an image of the item, to fill the name, description of the item, a dropdown to choose the category and a multiselect for the tags.
The App/Http/Controllers/ItemsController.php
takes care of data validation when adding a new item and of the item creation(see snippet below):
public function store(){
$attributes=request()->validate([
'name' => 'required|min:3|unique:items,name',
'category_id' =>'required|exists:categories,id',
'description' => 'required',
'picture' => 'required|mimes:jpg,jpeg,png,bmp,tiff |max:4096',
'tags' => 'required',
'tags.*' => 'exists:tags,id',
'status' =>'required|in:published,draft,archive',
'options' => 'required',
'date' => 'required'
]);
$path = request()->picture->store('pictures', 'public');
$attributes['picture'] = "$path";
$attributes['homepage'] = request()->homepage ? 1 : 0;
$attributes['options'] = request()->options ? request()->options : null;
$item = Item::create($attributes);
$item->tag()->sync(request()->get('tags'));
return redirect('items')->withStatus('Item successfully created.');
}
app
├── Console
│ └── Kernel.php
├── Exceptions
│ └── Handler.php
├── Http
│ ├── Controllers
│ │ ├── Controller.php
│ │ ├── CategoryController.php
│ │ ├── DashboardController.php
│ │ ├── ItemsController.php
│ │ ├── RolesController.php
│ │ ├── SessionsController.php
│ │ ├── TagController.php
│ │ ├── UserController.php
│ │ ├── UserManagementController.php
| ├── Kernel.php
│ └── Middleware
│ ├── Authenticate.php
│ ├── EncryptCookies.php
│ ├── PreventRequestsDuringMaintenance.php
│ ├── RedirectIfAuthenticated.php
│ ├── TrimStrings.php
│ ├── TrustHosts.php
│ ├── TrustProxies.php
│ └── VerifyCsrfToken.php
├── Models
│ ├── Category.php
│ ├── Item.php
│ ├── Role.php
│ ├── Tag.php
│ └── User.php
├── Policies
│ ├── CategoryPolicy.php
│ ├── ItemPolicy.php
│ ├── RolePolicy.php
│ ├── TagPolicy.php
│ └── UserPolicy.php
├── Providers
│ ├── AppServiceProvider.php
│ ├── AuthServiceProvider.php
│ ├── BroadcastServiceProvider.php
│ ├── EventServiceProvider.php
│ └── RouteServiceProvider.php
├── Database
| ...
| |
│ └── Seeders
│ ├── CategorySeeder.php
│ ├── DatabaseSeeder.php
│ ├── ItemSeeder.php
│ ├── RolesSeeder.php
│ ├── TagSeeder.php
│ └── UserSeeder.php
└── Resources
| |
| ...
│ └── Views
│ ├── applications
| │ ├── calendar.blade.php
│ | ├── crm.blade.php
│ | ├── datatables.blade.php
│ | ├── kanban.blade.php
│ | ├── stats.blade.php
│ | └── wizard.blade.php
│ ├── authentication
│ | ├── lock
| | | ├── basic.blade.php
| | | ├── cover.blade.php
| | | └── illustration.blade.php
│ | ├── reset
| | | ├── basic.blade.php
| | | ├── cover.blade.php
| | | └── illustration.blade.php
│ | ├── sign-in
| | | ├── basic.blade.php
| | | ├── cover.blade.php
| | | └── illustration.blade.php
│ | ├── sign-up
| | | ├── basic.blade.php
| | | ├── cover.blade.php
| | | └── illustration.blade.php
│ | └── verification
| | ├── basic.blade.php
| | ├── cover.blade.php
| | └── illustration.blade.php
│ ├── components
| │ ├── auth
| | | ├── footers
| | | | ├── auth
| | │ | └── footer.blade.php
| | │ | └── guest
| | │ | ├── basic-footer.blade.php
| | │ | └── social-icons-footer.blade.php
| │ | └── navbars
| | | ├── navs
| | | | ├── auth,blade.php
| | │ | └── guest.blade.php
| | │ └── sidebar.blade.php
│ | ├── page-template.blade.php
│ | └── plugins.blade.php
│ ├── dashboard
│ | ├── automotive.blade.php
│ | ├── discover.blade.php
│ | ├── index.blade.php
│ | ├── sales.blade.php
│ | └── smart-home.blade.php
│ ├── ecommerce
| │ ├── orders
| | | ├── details.blade.php
| │ | └── list.blade.php
| │ ├── products
| | | ├── edit-product.blade.php
| | | ├── new-product.blade.php
| | | ├── product-page.blade.php
| │ | └── products-list.blade.php
│ | └── referral.blade.php
│ ├── errors
| │ ├── 401.blade.php
│ | ├── 403.blade.php
│ | ├── 404.blade.php
│ | ├── 419.blade.php
│ | ├── 429.blade.php
│ | ├── 500.blade.php
│ | └── 503.blade.php
│ ├── laravel-examples
| │ ├── category
| | | ├── create.blade.php
| | | ├── edit.blade.php
| | | └── index.blade.php
| │ ├── items
| | | ├── create.blade.php
| | | ├── edit.blade.php
| │ | └── index.blade.php
| │ ├── roles
| | | ├── create.blade.php
| | | ├── edit.blade.php
| │ | └── index.blade.php
| │ ├── tag
| | | ├── create.blade.php
| | | ├── edit.blade.php
| │ | └── index.blade.php
| | |
| │ ├── user-profile
| │ | └── edit.blade.php
| │ ├── users
| | | ├── create.blade.php
| | | ├── edit.blade.php
| │ | └── index.blade.php
│ ├── pages
| │ ├── account
| | | ├── billing.blade.php
| | | ├── invoice.blade.php
| | | ├── security.blade.php
| │ | └── settings.blade.php
| │ ├── profile
| | | ├── overview.blade.php
| │ | └── projects.blade.php
| │ ├── projects
| | | ├── general.blade.php
| | | ├── new-project.blade.php
| │ | └── timeline.blade.php
| │ ├── users
| | | ├── new-user.blade.php
| │ | └── reports.blade.php
| │ ├── vr
| | | ├── vr-default.blade.php
| │ | └── vr-info.blade.php
│ | ├── charts.blade.php
│ | ├── notifications.blade.php
│ | ├── pricing-page.blade.php
│ | ├── rtl.blade.php
│ | ├── sweet-alerts.blade.php
│ | └── widgets.blade.php
│ ├── register
│ | └── create.blade.php
│ └── sessions
│ | ├── password
| | | ├── reset.blade.php
| │ | └── verify.blade.php
│ | └── create.blade.php
At present, we officially aim to support the last two versions of the following browsers:
We use GitHub Issues as the official bug tracker for the Soft UI Dashboard. Here are some advices for our users that want to report an issue:
Twitter: https://twitter.com/CreativeTim?ref=md2pl-readme
Facebook: https://www.facebook.com/CreativeTim?ref=md2pl-readme
Dribbble: https://dribbble.com/creativetim?ref=md2pl-readme
Instagram: https://www.instagram.com/CreativeTimOfficial?ref=md2pl-readme
Twitter: https://twitter.com/updivision?ref=md2pl-readme
Facebook: https://www.facebook.com/updivision?ref=md2pl-readme
Linkedin: https://www.linkedin.com/company/updivision?ref=md2pl-readme
Updivision Blog: https://updivision.com/blog/?ref=md2pl-readme