Voyager
HomeGithubIssues
1.2
1.2
  • Introduction
  • Getting started
    • What is Voyager
    • Installation
    • Upgrading
    • Configurations
  • BREAD
    • Introduction
    • Relationships
    • Formfields
      • Checkbox/Multiple Checkbox/Radio
      • Date & Time
      • Dropdown
      • Images
      • Media Picker
      • Number
  • Core concepts
    • Routing
    • Media Manager
    • Menus and Menu Builder
    • Database Manager
    • Settings
    • Compass
    • Roles and Permissions
    • Helper methods
    • Multilanguage
  • Customization
    • Overriding files
    • Overriding Routes
    • Additional CSS and JS
    • Enabling Soft-Delete
    • Custom relationship attributes
    • TinyMCE
    • Adding custom Formfields
    • Coordinates
    • BREAD accessors
    • Custom guard
    • Action buttons
  • Troubleshooting
    • Using HTTPS on yours site
    • Missing required parameter
Powered by GitBook
On this page
Export as PDF
  1. Customization

Custom guard

Starting with Voyager 1.2 you can define a (custom) guard which is used throughout Voyager. To do so, just bind your auth-guard to VoyagerAuth. Open your AuthServiceProvider and add the following to the register method:

$this->app->singleton('VoyagerAuth', function () {
    return Auth::guard('your-custom-guard');
});

Now this guard is used instead of the default guard.

PreviousBREAD accessorsNextAction buttons

Last updated 5 years ago