fix: fix BD exception in Event.php

This commit is contained in:
Mathieu Lagace
2021-09-27 09:30:52 -04:00
parent 1bec8805a7
commit 527155786a
3 changed files with 5 additions and 4 deletions

View File

@@ -26,6 +26,7 @@ class Kernel extends ConsoleKernel
{ {
// $schedule->command('inspire') // $schedule->command('inspire')
// ->hourly(); // ->hourly();
$schedule->command('telescope:prune')->weekly();
} }
/** /**

View File

@@ -102,7 +102,7 @@ class Event extends Model
$error->location = ""; $error->location = "";
$error->desc = ""; $error->desc = "";
$error->comment = "Le cours est manquant dans la base de données"; $error->comment = "Le cours est manquant dans la base de données";
$error->comment_officier = "Le cours est manquant dans la base de données"; $error->comment_officer = "Le cours est manquant dans la base de données";
$error->event_id = $this->id; $error->event_id = $this->id;
$error->user_id = 1; $error->user_id = 1;
return $error; return $error;

View File

@@ -21,7 +21,7 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
$this->hideSensitiveRequestDetails(); $this->hideSensitiveRequestDetails();
Telescope::filter(function (IncomingEntry $entry) { Telescope::filter(function (IncomingEntry $entry) {
if ($this->app->environment('local')) { if (env('TELESCOPE_ENABLED', true) | $this->app->environment('local')) {
return true; return true;
} }
@@ -63,8 +63,8 @@ class TelescopeServiceProvider extends TelescopeApplicationServiceProvider
protected function gate() protected function gate()
{ {
Gate::define('viewTelescope', function ($user) { Gate::define('viewTelescope', function ($user) {
return in_array($user->email, [ return in_array($user->rank->id, [
'admin@exvps.ca' '1',
]); ]);
}); });
} }