GCTC-NTGC /
TalentCloud
| 1 | <?php |
||||
| 2 | |||||
| 3 | namespace App\Providers; |
||||
| 4 | |||||
| 5 | use App\Models\Applicant; |
||||
| 6 | use App\Models\ExperienceAward; |
||||
| 7 | use App\Models\ExperienceCommunity; |
||||
| 8 | use App\Models\ExperienceEducation; |
||||
| 9 | use App\Models\ExperiencePersonal; |
||||
| 10 | use App\Models\ExperienceWork; |
||||
| 11 | use App\Models\JobApplication; |
||||
| 12 | use App\Services\WhichPortal; |
||||
| 13 | use Illuminate\Database\Eloquent\Relations\Relation; |
||||
| 14 | use Illuminate\Http\Resources\Json\JsonResource; |
||||
| 15 | use Illuminate\Support\Facades\Schema; |
||||
| 16 | 102 | use Illuminate\Support\ServiceProvider; |
|||
| 17 | |||||
| 18 | class AppServiceProvider extends ServiceProvider |
||||
| 19 | { |
||||
| 20 | 102 | /** |
|||
| 21 | * Bootstrap any application services. |
||||
| 22 | * |
||||
| 23 | 102 | * @return void |
|||
| 24 | 102 | */ |
|||
| 25 | public function boot() |
||||
| 26 | { |
||||
| 27 | // Prevent resource responses from being wrapped in a top |
||||
| 28 | // level 'data' key. |
||||
| 29 | // https://laravel.com/docs/eloquent-resources#data-wrapping. |
||||
| 30 | JsonResource::withoutWrapping(); |
||||
| 31 | 102 | ||||
| 32 | // A lower default string length for migrations is required for |
||||
| 33 | // versions of MySQL < 5.7.7. |
||||
| 34 | Schema::defaultStringLength(191); |
||||
| 35 | |||||
| 36 | // Force all routes and requests to use HTTPS. |
||||
| 37 | $this->app['request']->server->set('HTTPS', config('app.force_https')); |
||||
|
0 ignored issues
–
show
Bug
introduced
by
Loading history...
|
|||||
| 38 | |||||
| 39 | // Used in DB for _type column of Polymorphic relationships |
||||
| 40 | 34 | Relation::morphMap([ |
|||
| 41 | 102 | 'applicant' => Applicant::class, |
|||
| 42 | 102 | 'application' => JobApplication::class, |
|||
| 43 | 'experience_work' => ExperienceWork::class, |
||||
| 44 | 'experience_personal' => ExperiencePersonal::class, |
||||
| 45 | 'experience_education' => ExperienceEducation::class, |
||||
| 46 | 'experience_award' => ExperienceAward::class, |
||||
| 47 | 'experience_community' => ExperienceCommunity::class, |
||||
| 48 | ]); |
||||
| 49 | } |
||||
| 50 | |||||
| 51 | /** |
||||
| 52 | * Register any application services. |
||||
| 53 | * |
||||
| 54 | * @return void |
||||
| 55 | */ |
||||
| 56 | public function register() |
||||
| 57 | { |
||||
| 58 | $this->app->singleton(WhichPortal::class, function ($app) { |
||||
|
0 ignored issues
–
show
The parameter
$app is not used and could be removed.
(
Ignorable by Annotation
)
If this is a false-positive, you can also ignore this issue in your code via the
This check looks for parameters that have been defined for a function or method, but which are not used in the method body. Loading history...
|
|||||
| 59 | return new WhichPortal(); |
||||
| 60 | }); |
||||
| 61 | } |
||||
| 62 | } |
||||
| 63 |