![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/job-board.corals.io/vendor/cviebrock/eloquent-sluggable/src/ |
<?php namespace Cviebrock\EloquentSluggable; use Cviebrock\EloquentSluggable\Services\SlugService; use Illuminate\Foundation\Application as LaravelApplication; use Illuminate\Support\ServiceProvider as BaseServiceProvider; use Laravel\Lumen\Application as LumenApplication; /** * Class ServiceProvider * * @package Cviebrock\EloquentSluggable */ class ServiceProvider extends BaseServiceProvider { /** * Bootstrap the application services. */ public function boot(): void { $this->setUpConfig(); } /** * Register the application services. */ public function register() { $this->app->singleton(SluggableObserver::class, function($app) { return new SluggableObserver(new SlugService(), $app['events']); }); } protected function setUpConfig(): void { $source = dirname(__DIR__) . '/resources/config/sluggable.php'; if ($this->app instanceof LaravelApplication) { $this->publishes([$source => config_path('sluggable.php')], 'config'); } elseif ($this->app instanceof LumenApplication) { $this->app->configure('sluggable'); } $this->mergeConfigFrom($source, 'sluggable'); } }