Devise\Pages\PagesServiceProvider::boot PHP Method

boot() public method

Loads the route file which allows us to have slugs in the url (set via the dvs_pages database table)
public boot ( ) : void
return void
    public function boot()
    {
        // sometimes we want to manually load devise routes because it
        // requires a database connection to load the routes from dvs_pages
        // this database connection may not be setup just yet, as in the
        // case of when we are running functional tests, therefore we
        // need to manually include our routes file after the database
        // connection has been setup properly in the DeviseTestCase
        if (!array_key_exists('manuallyRequireDeviseRoutes', $GLOBALS) || !$GLOBALS['manuallyRequireDeviseRoutes']) {
            require __DIR__ . '/routes.php';
        }
        // register these field update bindings
        \Event::listen('devise.audio.field.updated', 'Devise\\Pages\\Fields\\Handlers\\AudioFieldUpdated');
        \Event::listen('devise.video.field.updated', 'Devise\\Pages\\Fields\\Handlers\\VideoFieldUpdated');
        \Event::listen('devise.image.field.updated', 'Devise\\Pages\\Fields\\Handlers\\ImageFieldUpdated');
    }