<?php

namespace App\Providers;

use App\Models\VideoSetting;
use creditzombies\LogViewer\Facades\LogViewer;
use Illuminate\Support\ServiceProvider;
use Illuminate\Pagination\Paginator;

class AppServiceProvider extends ServiceProvider
{
    /**
     * Register any application services.
     *
     * @return void
     */
    public function register()
    {
        $this->app->singleton('ManageFile', function ($app) {
            return new \App\Services\ManageFile();
        });

        $this->app->singleton('ManageLogging', function ($app) {
            return new \App\Services\ManageLogging();
        });

        LogViewer::auth(function ($request) {
            return $request->user()
                && in_array($request->user()->email, config('constant.authorized_log_viewer_emails'));
        });
    }

    /**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
    }
}
