![]() 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/ledger.corals.io/Corals/modules/CMS/Providers/ |
<?php namespace Corals\Modules\CMS\Providers; use Corals\Modules\CMS\Contracts; use Corals\Modules\CMS\Classes\OpenGraph; use Corals\Modules\CMS\Classes\SEOMeta; use Corals\Modules\CMS\Classes\SEOTools; use Corals\Modules\CMS\Classes\TwitterCards; use Illuminate\Config\Repository as Config; use Illuminate\Support\ServiceProvider; class SEOToolsServiceProvider extends ServiceProvider { /** * Indicates if loading of the provider is deferred. * * @var bool */ protected $defer = true; /** * @return void */ public function boot() { $configFile = __DIR__ . '/../config/seotools.php'; $this->mergeConfigFrom($configFile, 'seotools'); } /** * Register the service provider. * * @return void */ public function register() { $this->app->singleton('seotools.metatags', function ($app) { return new SEOMeta(new Config($app['config']->get('seotools.meta', []))); }); $this->app->singleton('seotools.opengraph', function ($app) { return new OpenGraph($app['config']->get('seotools.opengraph', [])); }); $this->app->singleton('seotools.twitter', function ($app) { return new TwitterCards($app['config']->get('seotools.twitter.defaults', [])); }); $this->app->singleton('seotools', function () { return new SEOTools(); }); $this->app->bind(Contracts\MetaTags::class, 'seotools.metatags'); $this->app->bind(Contracts\OpenGraph::class, 'seotools.opengraph'); $this->app->bind(Contracts\TwitterCards::class, 'seotools.twitter'); $this->app->bind(Contracts\SEOTools::class, 'seotools'); } /** * Get the services provided by the provider. * * @return array */ public function provides() { return [ Contracts\SEOTools::class, Contracts\MetaTags::class, Contracts\TwitterCards::class, Contracts\OpenGraph::class, 'seotools', 'seotools.metatags', 'seotools.opengraph', 'seotools.twitter', ]; } }