mirror of
https://github.com/pixelfed/pixelfed.git
synced 2024-11-09 16:24:51 +00:00
69 lines
1.3 KiB
PHP
69 lines
1.3 KiB
PHP
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Observers\{
|
|
AvatarObserver,
|
|
FollowerObserver,
|
|
LikeObserver,
|
|
NotificationObserver,
|
|
ModLogObserver,
|
|
ProfileObserver,
|
|
StatusHashtagObserver,
|
|
UserObserver,
|
|
UserFilterObserver,
|
|
};
|
|
use App\{
|
|
Avatar,
|
|
Follower,
|
|
Like,
|
|
Notification,
|
|
ModLog,
|
|
Profile,
|
|
StatusHashtag,
|
|
User,
|
|
UserFilter
|
|
};
|
|
use Auth, Horizon, URL;
|
|
use Illuminate\Support\Facades\Blade;
|
|
use Illuminate\Support\Facades\Schema;
|
|
use Illuminate\Support\ServiceProvider;
|
|
use Illuminate\Pagination\Paginator;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
URL::forceScheme('https');
|
|
Schema::defaultStringLength(191);
|
|
Paginator::useBootstrap();
|
|
Avatar::observe(AvatarObserver::class);
|
|
Like::observe(LikeObserver::class);
|
|
Notification::observe(NotificationObserver::class);
|
|
ModLog::observe(ModLogObserver::class);
|
|
Profile::observe(ProfileObserver::class);
|
|
StatusHashtag::observe(StatusHashtagObserver::class);
|
|
User::observe(UserObserver::class);
|
|
UserFilter::observe(UserFilterObserver::class);
|
|
Follower::observe(FollowerObserver::class);
|
|
Horizon::auth(function ($request) {
|
|
return Auth::check() && $request->user()->is_admin;
|
|
});
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|