From 5ad2393a1a1930aff4346b9b034fcc6c50c0b3db Mon Sep 17 00:00:00 2001 From: Didier Date: Mon, 31 Jul 2023 10:26:22 +0200 Subject: [PATCH] fix notification date --- app/Console/Commands/SendNotifications.php | 2 +- app/Http/Controllers/MeasureController.php | 2 +- app/Http/Controllers/UserController.php | 4 ++-- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Console/Commands/SendNotifications.php b/app/Console/Commands/SendNotifications.php index 78b73e9e..f25284d3 100644 --- a/app/Console/Commands/SendNotifications.php +++ b/app/Console/Commands/SendNotifications.php @@ -71,7 +71,7 @@ public function handle() // Date $txt .= ''; $txt .= ''; - if (strtotime($control->plan_date) >= strtotime('now')) { + if (strtotime($control->plan_date) > strtotime('now')) { $txt .= "" . $control->plan_date .' '; } else { $txt .= "" . $control->plan_date . ''; diff --git a/app/Http/Controllers/MeasureController.php b/app/Http/Controllers/MeasureController.php index a5f7925f..9253517f 100644 --- a/app/Http/Controllers/MeasureController.php +++ b/app/Http/Controllers/MeasureController.php @@ -54,7 +54,7 @@ public function index(Request $request) ->whereNull('controls.realisation_date'); }, null, null, 'left outer'); - if (($domain !== null)) { + if ($domain !== null) { $measures->where('measures.domain_id', $domain); $request->session()->put('domain', $domain); } diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 9e18c9e7..3c4ecd71 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -65,12 +65,12 @@ public function store(Request $request) ->withErrors(['password1' => 'No password']) ->withInput(); } - elseif (strlen(request('password1'))<8) { + if (strlen(request('password1'))<8) { return redirect('/users/create') ->withErrors(['password1' => 'Password too short']) ->withInput(); } - elseif (request('password1') !== request('password2')) { + if (request('password1') !== request('password2')) { return redirect('/users/create') ->withErrors(['password1' => 'Passwords does not match']) ->withInput();