
Inside this tutorial, we will create an admin panel in a very short time. Admin panel using Voyager composer package. This article is very interesting to learn admin panel development step by step.
How to Create Admin Panel using Voyager in Laravel 8
$ composer create-project --prefer-dist laravel/laravel blog
After following these steps we can install a Laravel application into the system.
To start the development server of Laravel –
$ php artisan serve
This command outputs –
Starting Laravel development server: http://127.0.0.1:8000
Assuming laravel already installed at the system.
By using composer we will install voyager. Open the project into the terminal and run this command.
$ composer require tcg/voyager
We need to create a database. For the database, we will use MySQL. We have 2 options available to create a database. Either we can use PhpMyAdmin Manual interface Or we can use a command to create.
CREATE DATABASE voyager_admin_panel;
Open .env file for application connectivity.
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=voyager_admin_panel
DB_USERNAME=your database user nanme
DB_PASSWORD=Your database password
There are two options to create the admin panel either with a dummy data or without.
To install Voyager without dummy data
$ php artisan voyager:install
To install Voyager with the dummy data
$ php artisan voyager:install --with-dummy
It is preferable to run the command using the dummy data and delete it after admin panel testing.
If we go inside the database to see the tables and dummy data that we have installed. A total of 17 tables were created.
Open project to the terminal and type the command to start a development server
$ php artisan serve
By default, Voyager provides Admin login details as –
Email: admin@admin.com Password: password
Admin URL: http://127.0.0.1:8000/admin
Thanks for reading..