Voyager Laravel is a popular open-source package that provides an easy-to-use admin panel and CRUD functionality for Laravel applications. Voyager Laravel is built on top of the Laravel framework. It is designed to simplify building and managing Laravel applications by providing a user-friendly interface for managing data, media, users, and permissions.
With Voyager, you can easily create and manage content for your applications without writing complex code or building custom admin panels from scratch. Laravel Voyager also offers a range of customization options, making it easy to tailor it to your specific needs and requirements.
Whether building a simple blog or a complex web application, Voyager Laravel can help you streamline the development and management process and get your application up and running quickly.
Installing Voyager Laravel
In this section, we will install Voyager and configure it to use a new Laravel application. Here are the steps.
Install Laravel
Voyager is built on top of the Laravel framework. So, the first step is to install Laravel if you haven't already.
composer create-project --prefer-dist laravel/laravel voyager_laravel
This will create a new Laravel project in a directory called voyager_laravel
.
Install Voyager
Next, install Voyager using Composer.
composer require tcg/voyager
This will install the latest version of Voyager and all of its dependencies.
Publish Voyager's assets
After installing Voyager, you need to publish its assets to your application.
php artisan voyager:install --with-dummy
This command will publish Voyager's configuration files, views, assets, and other files to your application. The --with-dummy
option will also install some dummy data to help you get started. It creates for your application a user with the following login credentials:
email: admin@admin.com
password: password
Alternatively, you can assign admin privileges to an existing user
php artisan voyager:admin your@email.com
or create a new admin user with the --create
flag.
php artisan voyager:admin your@email.com --create
Configure your database
Voyager uses your application's database to store data. You need to configure your database settings in your .env
file. Update the DB_HOST
, DB_PORT
, DB_DATABASE
, DB_USERNAME
, and DB_PASSWORD
variables to match your database settings.
Run the migration and start the application
Finally, run the migration to create the necessary tables in your database.
php artisan migrate
This will create the necessary tables in your database.
Now you can start the application.
php artisan serve
and log in at http://127.0.0.1:8000/admin
.
Using Voyager Laravel
After logging in to Voyager admin, there are unlimited things you can do at a click of a button. For example, you can manage your application's data through the Admin panel.
At a glance, you can see we have 1 user, 4 dummy posts and 1 page. The left panel exposes you to all settings, customizations and management of your application.
You can do CRUD (create, read, update, delete) functionality without writing custom code. For example, if you click on View all posts, Voyager takes you to an interface with all the posts. You create a new post or update, delete, and read the existing ones on the same interface.
Besides, you can use media manager, BREAD builder, user role management and customization options through the dashboard.
Media manager: Voyager includes a media manager that allows you to upload and manage media files, such as images and videos. You can use the media manager to add images to your application's pages or to create image galleries.
BREAD builder: Voyager includes a BREAD (browse, read, edit, add, delete) builder that allows you to create CRUD functionality for your application's data quickly. The BREAD builder can create custom data types and manage their fields.
User and role management: Voyager provides a user and role management system that allows you to manage your application's users and their roles and permissions. You can create new users, assign roles to them, and define their permissions.
Customization options: Voyager provides a range of customization options, such as the ability to create custom views, layouts, and data types. You can use these customization options to tailor Voyager to your specific needs and requirements.
Conclusion
Voyager Laravel is a powerful open-source package that provides an easy-to-use admin panel and CRUD functionality for Laravel applications. It simplifies the process of building and managing Laravel applications by providing a user-friendly interface for managing data, media, users, and permissions.
With Voyager, you can easily create and manage content for your applications without writing complex code or building custom admin panels from scratch. Voyager also offers a range of customization options, making it easy to tailor it to your specific needs and requirements.
If you are a Laravel developer looking to simplify the development and management process of your Laravel application, then Voyager Laravel is worth considering. With its powerful features and customization options, Voyager can help you save time and effort while building and managing your application.
So why not try Voyager and see how it can benefit your Laravel project? Start by following the installation steps and exploring its features to see how it can make your development journey more efficient and enjoyable.