src/CloudflareServiceProvider.php
/**
     * Bootstrap any application services.
     *
     * @return void
     */
Bootstrap any application services.
@return void
Bootstrap any application services . @return void
public function boot()
    {
        $this->publishes([
            __DIR__ . '/../config/cloudflare.php' => config_path('cloudflare.php'),
        ], 'config');
        $this->loadViewsFrom(__DIR__ . '/../resources/views', 'laravel-cloudflare');
        $this->app->booted(function () {
            $this->routes();
        });
        $this->app->singleton(Cloudflare::class, function () {
            return new Cloudflare(config('cloudflare.zone'), config('cloudflare.email'), config('cloudflare.key'));
        });
        Nova::serving(function (ServingNova $event) {
            Nova::script('laravel-cloudflare-field', __DIR__ . '/../dist/js/field.js');
            Nova::style('laravel-cloudflare-field', __DIR__ . '/../dist/css/styles.css');
        });
    }
public function boot ( ) { $ this -> publishes ( [ __DIR__ . '/../config/cloudflare.php' => config_path ( 'cloudflare.php' ) , ] , 'config' ) ; $ this -> loadViewsFrom ( __DIR__ . '/../resources/views' , 'laravel-cloudflare' ) ; $ this -> app -> booted ( function ( ) { $ this -> routes ( ) ; } ) ; $ this -> app -> singleton ( Cloudflare :: class , function ( ) { return new Cloudflare ( config ( 'cloudflare.zone' ) , config ( 'cloudflare.email' ) , config ( 'cloudflare.key' ) ) ; } ) ; Nova :: serving ( function ( ServingNova $ event ) { Nova :: script ( 'laravel-cloudflare-field' , __DIR__ . '/../dist/js/field.js' ) ; Nova :: style ( 'laravel-cloudflare-field' , __DIR__ . '/../dist/css/styles.css' ) ; } ) ; }
Bootstrap any application services.
Bootstrap any application services .