This commit is contained in:
2018-11-12 23:38:07 -06:00
parent 1ad9edd170
commit 3231ce7c43

View File

@@ -6,6 +6,7 @@ use Illuminate\Http\Request;
use Auth; use Auth;
use DB; use DB;
use Carbon\Carbon;
use App\Library\Fleet; use App\Library\Fleet;
@@ -36,7 +37,8 @@ class FleetsController extends Controller
//Check for the fleet in the database //Check for the fleet in the database
$check = DB::table('Fleets')->where('fleet', $fleetUri)->first(); $check = DB::table('Fleets')->where('fleet', $fleetUri)->first();
//If we do not find the fleet, let's create it. //If we do not find the fleet, let's create it.
if($check === null) { if($check === null) {
$current = Carbon::now(); $current = Carbon::now();
//If we are between 00:00 and 05:00, we want to set the end time for 0500 //If we are between 00:00 and 05:00, we want to set the end time for 0500
if($current->hour > 0 && $current->hour < 5) { if($current->hour > 0 && $current->hour < 5) {