Table of Contents
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.
Voyager provides the complete package of an admin panel in laravel. So inside this article we will create admin panel using voyager in laravel 8. Voyager for Laravel gives a modern and responsive PhpMyAdmin like admin panel with CRUD support and precise users’ access control for your Laravel API.
Very few simple steps we need to install and configure admin panel.
Let’s get started.
Installation of Laravel Application
Laravel Installation can be done in two ways.
- Laravel Installer
- By using composer
To install Laravel via Laravel installer, we need to install it’s installer first. We need to make use of composer for that.
composer global require laravel/installer
This command will install laravel installer at system. This installation is at global scope, so you type command from any directory at terminal. To verify type the given command –
This command will open a command palette of Laravel Installer.
To create ad install laravel project in system,
laravel new blog
With the name of blog a laravel project will be created at your specified path.
By using composer
Alternatively, we can also install Laravel by Composer command create-project. If your system doesn’t has Composer Installed, Learn Composer Installation Steps. Here is the complete command to create a laravel project-
composer create-project --prefer-dist laravel/laravel blog
After following these steps we can install a Laravel application into 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 system.
Install Voyager for Laravel
By using composer we will install voyager. Open project into terminal and run this command.
$ composer require tcg/voyager
Create Database & Application Connectivity
We need to create a database. For database we will use MySQL. We have 2 options available to create database. Either we can use PhpMyAdmin Manual interface Or we can use 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=admin DB_PASSWORD=Admin@123
Run Voyager installer Laravel
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 database to see the tables and dummy data what we have installed. Total 17 tables created.
Open project to terminal and type the command to start development server
$ php artisan serve
By default Voyager provides Admin login details as –
Email: email@example.com Password: password
Admin URL: http://127.0.0.1:8000/admin
Create a Different Admin User
Instead of using the default admin login details, if needs to create new one. Run this command –
$ php artisan voyager:admin firstname.lastname@example.org --create
$ php artisan voyager:admin email@example.com --create
It will ask few questions like Admin name, password, confirm password.
Now, you can use your own login details to use Voyager Admin panel in Laravel 8.
Here, is the menus generated at admin panel of voyager.
About Generated Files
- Route added inside /routes/web.php
- Admin Panel Files – /vendor/tcg/voyager
We hope this article helped you to learn about How to Create Admin Panel using Voyager in Laravel 8 in a very detailed way.
Find More on Laravel 8 Articles here
- How to Create Multi Language Website in Laravel 8
- How To Read XML File in Laravel 8 – Example
- How To Upload And Save XML Data in Laravel 8
- Laravel 8 Ajax Post Request Tutorial
- Laravel 8 Authentication using Jetstream with Inertia Js
- Laravel 8 Authentication using Jetstream with Livewire
- Laravel 8 Authentication with Breeze Tutorial
- Laravel 8 Clear Cache of Route, View & Config
- Laravel 8 Cron Job Task Scheduling Tutorial
- Laravel 8 DataTable Ajax Pagination with Search And Sort
- Laravel 8 Firebase Push Notification Tutorial
- Laravel 8 Form Validation Methods
- Laravel 8 Installation Guide – PHP Framework
- Laravel 8 Layouts And Views Complete Guide
- Laravel 8 Routing Tutorial Step by Step Guide
- Laravel 8 Send Mail using Gmail SMTP Server
- Laravel 8 Send Push Notification to Android Using Firebase
- Laravel 8 Send Push Notification to IOS Using Firebase
- Laravel 8 Stub Customization
Hi, I am Sanjay the founder of Online Web Tutor. I welcome you all guys here to join us. Here you can find the web development blog articles. You can add more skills in web development courses here.
I am a Web Developer, Motivator, Author & Blogger. I also used to take online classes including tech seminars over web development courses. We also handle our premium clients and delivered up to 50+ projects.