initial commit
This commit is contained in:
41
app/Providers/AppServiceProvider.php
Normal file
41
app/Providers/AppServiceProvider.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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()
|
||||
{
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user