The "booting" method of the model.

@return void
329945
protected static function boot() {
        parent::boot();

        if (config('filer.cleanup_on_delete')) {
            static::deleting(function ($file) {
                $path = config('filer.path.absolute') . "{$file->path}/{$file->filename}";

                if (is_file($path)) {
                    unlink($path);
                }
            });
        }

        // Whenever a new model is created in the database, we add a hash
        static::creating(function ($model) {
            $model->hash = $model->generateHash();
        });
    }
1075172
protected static function boot(): void
    {
        parent::boot();

        /**
         * Attach to the 'creating' Model Event to provide record with user id which is now creating this record
         */
        static::updating(function($model) {

            if (auth()->user()) {
                $updatorId = auth()->id();
            } else {
                $updatorId = null;
            }

            $model->{'updated_by'} = $updatorId;
        });
    }
404829
public function boot()
    {
        if (config('modules.register.translations', true) === true) {
            $this->registerTranslation();
        }

        if ($this->isLoadFilesOnBoot()) {
            $this->registerFiles();
        }

        $this->fireEvent('boot');
    }
1246432
public function boot()
    {
        /*
         * Migrations
         */
        $this->publishes([
            __DIR__ . '/../database/factories' => database_path('factories/'),
        ], $this->package_tag . '-factories');
        $this->publishes([
            __DIR__ . '/../database/migrations' => database_path('migrations/'),
        ], $this->package_tag . '-migrations');
        $this->publishes([
            __DIR__ . '/../database/seeds' => database_path('seeds/'),
        ], $this->package_tag . '-seeds');

        /*
         * Commands
         */
        if ($this->app->runningInConsole()) {
            $this->commands([
                \CleaniqueCoders\Profile\Console\Commands\SeedProfileCommand::class,
            ]);
        }
    }
516938
public function boot()
  {
    if ($this->booted) return;
    
    $this->container = $container = new Container();
    
    $this->registerServices      ($container);
    $this->registerRoutes        ($container);
    $this->registerEventListeners($container);
    
    $this->booted = true;
  }
1098785
public function boot()
    {
        $this->publishes(
            [
                $this->getConfigPath() => config_path('vanilla-integration.php'),
            ],
            'config'
        );
        $this->loadRoutesFrom(__DIR__ . '/../../../routes/routes.php');
        $this->registerHelpers();
    }
465532
protected static function boot ()
    {
        parent::boot ();

        /**
         * Attach to the 'creating' Model Event to provide a UUID
         * for the `id` field (provided by $model->getKeyName())
         */
        static::creating (function ($model)
        {
            if (!isset($model->attributes['id']))
                $model->attributes['id'] = uuid4 ();

            $model->{$model->getKeyName ()} = $model->attributes['id'];
        });
    }
36926
protected static function boot()
    {
        parent::boot();

        self::$buildQueryScopeDefaults['columns'] = [
            'id',
            'question',
            'single',
            'closed',
        ];

        self::$buildQueryScopeDefaults['relations'] = [
            'options' => function (HasMany $optionsQuery) {
                $optionsQuery->select(['id', 'poll_id', 'answer'])->withCount('votes');
            },
        ];
    }
350503
public function boot()
    {
        $this->loadConfig();
        $this->registerExceptionHandler();
        $this->registerProviders();
        $this->registerAliases();
        $this->registerScaraMasterSessionToken();
    }
868352
public function boot()
    {
        $router = $this->app->make(Router::class);
        $events = $this->app->make(Dispatcher::class);
        $kernel = $this->app->make(Kernel::class);

        $this->setExtensionPath();

        $this->registerEventListeners($events);
        $this->registerRouteMiddleware($router, $kernel);
        $this->bootConfiguration();
        $this->bootMemory();
        $this->bootExtensionComponents();
        $this->bootExtensionRouting();
        $this->bootApiRouting($router);
        $this->loadMenuFile();
        $this->loadBreadcrumbsFile();
    }
758343
public function boot()
    {
        $this->setRootControllerNamespace();

        $this->loadRoutes();

        $this->app->booted(function () {
            $this->refreshRoutes($this->app['router']);
        });
    }
1291770
public function boot()
    {
        $this->app->booting(function () {
            $loader = AliasLoader::getInstance();
            $loader->alias('SessionFallback', SessionFallbackFacade::class);
        });
        $this->publishes([
            __DIR__ . '/config/session_fallback.php' => config_path('session_fallback.php'),
        ]);
    }
779275
public function boot()
    {
        foreach ($this->cachedModels as $cachedModel) {
            $closure = function ($model) {
                if ($model instanceof Cacheable) {
                    foreach ($model->getCacheKeys() as $key) {
                        $this->app['cache.store']->forget($key);
                    }
                }
            };

            $cachedModel::saved($closure);
            $cachedModel::deleted($closure);
        }
    }
242884
public function boot()
    {
        $app = $this->app;

        // Listen to log messages.
        $app['log']->listen(function ($level, $message, $context) use ($app) {
            $app['rollbar.handler']->log($level, $message, $context);
        });
    }
152521
protected function booting()
    {
        $this->setInstance();

        $this->bind('Sun\Contracts\Container\Container', $this->getContainer());

        $this->bind('Sun\Contracts\Application', $this);

        $this->config = $this->make('Sun\Support\Config');
    }
1314045
public function boot()
    {
        if ($this->app->runningInConsole()) {
            $this->publishes([
                __DIR__.'/../../../dist' => web_path('dist')
            ], 'themosis');

            $this->publishes([
                __DIR__.'/../Exceptions/views' => resource_path('views/errors/')
            ], 'themosis-errors');
        }
    }
554856
public function boot()
    {
        /*Load views*/
        $this->loadViewsFrom(__DIR__ . '/../../resources/views', 'webed-theme');
        /*Load translations*/
        $this->loadTranslationsFrom(__DIR__ . '/../../resources/lang', 'webed-theme');
        /*Load migrations*/
        $this->loadMigrationsFrom(__DIR__ . '/../../database/migrations');

        $this->publishes([
            __DIR__ . '/../../resources/assets' => resource_path('assets'),
        ], 'webed-assets');
        $this->publishes([
            __DIR__ . '/../../resources/public' => public_path(),
        ], 'webed-public-assets');
    }