I have 2 values $minsRecoded and $totalMins and I would like if the minsRecorded is greater the the totalMins then display $totalMinsComplted in a danger badge.
Here is what I have in my controller
$sumMins = \App\ProjectTimeLog::where('user_id', '=', '1')->pluck('total_minutes')->sum()/60;
$minsRecoded = Task::getTotalMinsCompleted()/60;
$totalMin = \App\ProjectTimeLog::where('user_id', '=', '1')->pluck('total_minutes')->sum()/60;
$this->totalMins = \App\ProjectTimeLog::where('user_id', '=', '1')->pluck('total_minutes')->sum()/60;
if ($minsRecoded < $totalMin) $this->totalMinsCompleted = '<span class="badge badge-danger">";
Here is my view
/
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/2UowiXt
via IFTTT
Aucun commentaire:
Enregistrer un commentaire