2022-04-22 20:01:30 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Providers;
|
|
|
|
|
2022-04-23 16:25:16 -07:00
|
|
|
use Illuminate\Database\Eloquent\Relations\Relation;
|
2022-04-23 19:31:00 -07:00
|
|
|
use Illuminate\Pagination\Paginator;
|
2022-04-26 21:16:46 -07:00
|
|
|
use Illuminate\Support\Facades\DB;
|
2022-04-22 20:01:30 -07:00
|
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Register any application services.
|
|
|
|
*/
|
|
|
|
public function register()
|
|
|
|
{
|
2022-04-26 21:16:46 -07:00
|
|
|
|
2022-04-22 20:01:30 -07:00
|
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Bootstrap any application services.
|
|
|
|
*/
|
|
|
|
public function boot()
|
|
|
|
{
|
2022-04-23 16:25:16 -07:00
|
|
|
Relation::enforceMorphMap([
|
2022-04-26 21:16:46 -07:00
|
|
|
'joined' => 'App\Models\Joined',
|
|
|
|
'owned' => 'App\Models\Owned',
|
|
|
|
'wish' => 'App\Models\Wish',
|
|
|
|
]);
|
|
|
|
|
|
|
|
Paginator::defaultView('vendor.pagination.default');
|
|
|
|
Paginator::defaultSimpleView('vendor.pagination.simple-default');
|
2022-04-23 19:31:00 -07:00
|
|
|
|
2022-04-26 21:16:46 -07:00
|
|
|
DB::connection()->setQueryGrammar(new \App\Database\Query\Grammars\MySqlGrammar());
|
2022-04-22 20:01:30 -07:00
|
|
|
}
|
|
|
|
}
|