Voyager - The Missing Laravel Admin

Voyager - The Missing Laravel Admin

Voyager is a powerful Laravel based tool that provides admin interface that can be used with Laravel app. It provides CRUD generate functionality, So you can easily create CRUD. You can easily add, edit and delete data for your Laravel app.


Voyager has following features:

  • Menu
  • Media Manager
  • User Access (Roles & Permissions)

BREAD: BREAD is database tool that allows you to Browse, Read, Edit, Add and Delete functionality to add to any of your database tables.

  • Browse: Field will be visible when you’re on data listing page.
  • Read: Field will be visible when you're on data details page.
  • Edit: Field will be visible when you're on data edit page.
  • Add: Field will be visible when you create new data.
  • Delete: It will show on listing page.

BREAD also allows you to choose specific form field for form type. This can be a TextBox, TextArea, Checkbox, Image, and many other types of form elements.
For more information read this article.


Menu: Voyager provides you the functionality to add menu easily. You can easily create a menu for your application. You can add, edit and delete menu items from Menu Builder option into menu listing.




For more information read this article.

Media Manager: Voyager also provides a simple media manager to manage your files.

Media Manager

User Access (Roles & Permissions): Voyager provides you the functionality of user management. Voyager has roles and permissions functionality. Each user has a role and each role has multiple permissions.

Voyager provides a hasPermission method that will return the boolean value.


If you have to check user has admin access permission or not then below simple snippet will work for you.


User Access

For more information read this article. 


How to install voyager into your Laravel app.

You can use below command for install voyager after creating new Laravel application.

composer require tcg/voyager

Now create a new database for application and add credentials to your database in .env file.

  • DB_HOST=localhost
  • DB_DATABASE=homestead
  • DB_USERNAME=homestead
  • DB_PASSWORD=secret

Next step is to add voyager service provider to the config/app.php file in the provider's array.

'providers' => [
    // Laravel Framework Service Providers...

    // Package Service Providers
    // ...

    // Application Service Providers
    // ...


Now you can install voyager with dummy data and without dummy data.

Install voyager with dummy data run following command:

php artisan voyager:install --with-dummy

If a there Specified key was too long error follow solution link.

Install voyager without dummy data run following command:

php artisan voyager:install

Now start development server with PHP artisan serve and visit http://localhost:8000/admin

If you install voyager with dummy data then a user is auto created with below credentials:
Password: password

For more information read this article. 


Customization into Voyager

  • Overriding Views: Voyager provides functionality to override BREAD view by creating a new folder into resources/views/vendor/voyager/slug-name and slug-name will be a slug that you have assigned to that table.
  • Overriding default voyager controllers: You can extend voyager’s controllers. For it, you have to define you controller namespace into config/voyager.php file.
    | Controllers config
    | Here you can specify voyager controller settings

    'controllers' => [
        'namespace' => 'App\\Http\\Controllers\\Voyager',


Then run PHP artisan voyager:controllers command that will create child controllers into App/Http/Controllers/Voyager. Now Voyager uses child controllers.
Now you can override method of any controller.



Override method of VoyagerDatabaseController.

public function updateBread(Request $request, $id) 
	// Your modification


Overriding routes: You can override routes of voyager by simply add route after Voyager::routes(); a line from routes/web.php file. For example, override profile route.

Route::group(['prefix' => 'admin'], function () {

   		// Your overwrites here
   		Route::get('profile', ['uses' => 'MyAuthController@profile', 'as'      => 'profile']);


Theming (Addition CSS and JS): You can add additional js and CSS from config/voyager.php file for theming voyager.

// Here you can specify additional assets you would like to be included in the master.blade
    'additional_css' => [

    'additional_js' => [


Here is Voyager Cheatsheet there some method and function that you can use your Laravel app with voyager functionality.

Slack Channel:

For more voyager details you can read voyager document and if you need more assistance regarding Laravel Development Service then contact us now!