parent
091307b20f
commit
401197b683
|
|
@ -7,6 +7,7 @@ use App\Exceptions\ManageEntryException;
|
|||
use App\Models\Audition;
|
||||
use App\Models\AuditLogEntry;
|
||||
use App\Models\Entry;
|
||||
use Carbon\Carbon;
|
||||
use Illuminate\Http\Request;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
|
|
@ -38,7 +39,9 @@ class EntryController extends Controller
|
|||
'audition_id' => ['required', 'exists:auditions,id'],
|
||||
]);
|
||||
$audition = Audition::find($validData['audition_id']);
|
||||
if ($audition->entry_deadline < now()) {
|
||||
$currentDate = Carbon::now('America/Chicago');
|
||||
$currentDate = $currentDate->format('Y-m-d');
|
||||
if ($audition->entry_deadline < $currentDate) {
|
||||
return redirect()->route('entries.index')->with('error', 'The entry deadline for that audition has passed');
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue