• Stars
    star
    230
  • Rank 174,053 (Top 4 %)
  • Language
    HTML
  • License
    MIT License
  • Created almost 6 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Argon Frontend Preset For Laravel Framework 9.x and Up

Argon Dashboard 2 Laravel - Free

version license GitHub issues open GitHub issues closed

Frontend version: Argon Dashboard v3.0.0. More info at https://www.creative-tim.com/product/argon-dashboard

Speed up your web development with the Bootstrap 5 Admin Dashboard built for Laravel Framework 9.x and up.

If you want to get more features, go PRO with Argon Dashboard 2 PRO Laravel.

Table of Contents

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/9.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. Type in your terminal: composer require laravel/ui
  3. Install this preset via composer require laravel-frontend-presets/argon. No need to register the service provider. Laravel 9.x & up can auto detect the package.
  4. Run php artisan ui argon 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)
  5. In your terminal run composer dump-autoload
  6. Run php artisan migrate:fresh --seed to create basic users table

By using the archive

  1. In your application's root create a presets folder
  2. Download the archive of the repo and unzip it
  3. Copy and paste the downloaded folder in presets (created in step 2) and rename it to argon
  4. Open composer.json file
  5. Add "LaravelFrontendPresets\\ArgonPreset\\": "presets/argon/src" to autoload/psr-4 and to autoload-dev/psr-4
  6. Add LaravelFrontendPresets\ArgonPreset\ArgonPresetServiceProvider::class to config/app.php file
  7. Type in your terminal: composer require laravel/ui
  8. In your terminal run composer dump-autoload
  9. Run php artisan ui argon 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)
  10. Add in your .env file the info for your database
  11. Run php artisan migrate:fresh --seed to create basic users table
  12. Run npm install perfect-scrollbar

Usage

Register a user or login with default user [email protected] and password secret from your database and start testing (make sure to run the migrations and seeders for these credentials to be available).

Besides the dashboard, the auth pages, the billing and table pages, there is also has an edit profile page. 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.

Versions

HTML Vue Laravel
Argon Dashboard HTML Vue Argon Dashboard Argon Dashboard Laravel

Demo

Register Login Dashboard
Forgot Password Page Reset Password Page Profile Page
View More

Documentation

The documentation for the Material Dashboard Laravel is hosted at our website.

Login

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 [email protected] with the password secret. Logging in is possible only with already existing credentials. For this to work you should have run the migrations.

The App/Http/Controllers/Logincontroller.php handles the logging in of an existing user.

    public function login(Request $request)
    {
        $credentials = $request->validate([
            'email' => ['required', 'email'],
            'password' => ['required'],
        ]);

        if (Auth::attempt(['email' => $request->email, 'password' => $request->password])) {
            $request->session()->regenerate();

            return redirect()->intended('dashboard');
        }

        return back()->withErrors([
            'email' => 'The provided credentials do not match our records.',
        ]);
    }

Register

You can register as a user by filling in the name, email and password for your account. 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 /register in the url.

The App/Http/Controllers/RegisterController.php handles the registration of a new user.

    public function store()
    {
        $attributes = request()->validate([
            'username' => 'required|max:255|min:2',
            'email' => 'required|email|max:255|unique:users,email',
            'password' => 'required|min:5|max:255',
            'terms' => 'required'
        ]);
        $user = User::create($attributes);
        auth()->login($user);

        return redirect('/dashboard');
    }

Forgot Password

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/ResetPasswordController.php takes care of sending an email to the user where he can reset the password afterwards.

    public function send(Request $request)
    {
        $email = $request->validate([
            'email' => ['required']
        ]);
        $user = User::where('email', $email)->first();

        if ($user) {
            $this->notify(new ForgotPassword($user->id));
            return back()->with('succes', 'An email was send to your email address');
        }
    }

Reset Password

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 email, the password and confirm the password for his password to be updated.

The App/Http/Controllers/ChangePasswordController.php helps the user reset the password.

    public function update(Request $request)
    {
        $attributes = $request->validate([
            'email' => ['required'],
            'password' => ['required', 'min:5'],
            'confirm-password' => ['same:password']
        ]);

        $existingUser = User::where('email', $attributes['email'])->first();
        if ($existingUser) {
            $existingUser->update([
                'password' => $attributes['password']
            ]);
            return redirect('login');
        } else {
            return back()->with('error', 'Your email does not match the email who requested the password change');
        }
    }

User Profile

The profile can be accessed by a logged in user by clicking "Profile" from the sidebar or adding /profile in the url. The user can add information like phone number, location, description or change the name and email.

The App/Http/Controllers/UserProfileController.php handles the user's profile information.

        auth()->user()->update([
            'username' => $request->get('username'),
            'firstname' => $request->get('firstname'),
            'lastname' => $request->get('lastname'),
            'email' => config('app.is_demo') ? auth()->user()->email : $request->get('email') ,
            'address' => $request->get('address'),
            'city' => $request->get('city'),
            'country' => $request->get('country'),
            'postal' => $request->get('postal'),
            'about' => $request->get('about')
        ]);
    
}

Dashboard

You can access the dashboard either by using the "Dashboard" link in the left sidebar or by adding /dashboard in the url after logging in.

File Structure

 ┣ 📂Console
 ┃ ┗ 📜Kernel.php
 ┣ 📂Exceptions
 ┃ ┗ 📜Handler.php
 ┣ 📂Http
 ┃ ┣ 📂Controllers
 ┃ ┃ ┣ 📜ChangePassword.php
 ┃ ┃ ┣ 📜Controller.php
 ┃ ┃ ┣ 📜HomeController.php
 ┃ ┃ ┣ 📜LoginController.php
 ┃ ┃ ┣ 📜PageController.php
 ┃ ┃ ┣ 📜RegisterController.php
 ┃ ┃ ┣ 📜ResetPassword.php
 ┃ ┃ ┗ 📜UserProfileController.php
 ┃ ┣ 📂Middleware
 ┃ ┃ ┣ 📜Authenticate.php
 ┃ ┃ ┣ 📜EncryptCookies.php
 ┃ ┃ ┣ 📜PreventRequestsDuringMaintenance.php
 ┃ ┃ ┣ 📜RedirectIfAuthenticated.php
 ┃ ┃ ┣ 📜TrimStrings.php
 ┃ ┃ ┣ 📜TrustHosts.php
 ┃ ┃ ┣ 📜TrustProxies.php
 ┃ ┃ ┗ 📜VerifyCsrfToken.php
 ┃ ┗ 📜Kernel.php
 ┣ 📂Models
 ┃ ┗ 📜User.php
 ┣ 📂Notifications
 ┃ ┗ 📜ForgotPassword.php
 ┣ 📂Providers
 ┃ ┣ 📜AppServiceProvider.php
 ┃ ┣ 📜AuthServiceProvider.php
 ┃ ┣ 📜BroadcastServiceProvider.php
 ┃ ┣ 📜EventServiceProvider.php
 ┃ ┗ 📜RouteServiceProvider.php
 ┗ 📂View
 ┃ ┗ 📂Components
 ┃ ┃ ┗ 📜Alert.php

Browser Support

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

Reporting Issues

We use GitHub Issues as the official bug tracker for the Material Dashboard. 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 Material Dashboard. 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

Social Media

Creative Tim

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

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

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

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

Updivision:

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

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

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

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

Credits

More Repositories

1

tall

A TALL (Tailwind CSS, Alpine.js, Laravel and Livewire) Preset for Laravel
Blade
2,414
star
2

tailwindcss

A Tailwind CSS frontend preset for the Laravel Framework
Blade
1,147
star
3

material-dashboard

Material Frontend Preset For Laravel Framework 9.x and Up
CSS
259
star
4

now-ui-dashboard

CSS
226
star
5

bulma

Bulma Frontend Preset For Laravel Framework 5.5 and Up
HTML
171
star
6

inertiajs

An Inertia.js frontend preset for the Laravel Framework
PHP
145
star
7

black-dashboard

Black Frontend Preset For Laravel Framework 9.x and Up
CSS
85
star
8

laravel-vuetify

A Vuetify frontend preset for the Laravel Framework
HTML
80
star
9

zurb-foundation

Zurb Foundation Frontend Preset For Laravel Framework 5.5 and Up
SCSS
52
star
10

paper-dashboard

CSS
49
star
11

white-dashboard

CSS
48
star
12

uikit3

Laravel 5.5+ Front-end preset for UIKit 3.
HTML
44
star
13

laravel-preset-bootstrap4

HTML
39
star
14

light-bootstrap-dashboard

Blade
34
star
15

skeleton

A skeleton repository to help users to create their own presets.
PHP
13
star
16

stimulus

Laravel 5.5+ frontend preset for Stimulus
PHP
10
star
17

tachyons

Laravel 5.5.x front-end preset for Tachyons scaffolding
HTML
8
star
18

tabler

Laravel 7.x Front-end preset for Tabler UI
HTML
7
star
19

laravel-frontend-presets.github.io

The Laravel Frontend Presets' Website
HTML
7
star
20

w3css

Laravel 5.5.x Front-end Preset For W3CSS
HTML
4
star
21

karma-eslint

Laravel Preset for using Karma, ESLint (Airbnb), along with your built in laravel-mix & Vue.js setup, to get a working unit testing & code coverage for your JS assets.
JavaScript
3
star
22

internals

For Internal Discussion
2
star
23

primercss

Laravel 5.5.x front-end preset for Primer CSS scaffolding
PHP
1
star