v1.5.5 Deleted some event deleter
This commit is contained in:
parent
5f7bb3f62f
commit
4a13c17ab2
|
@ -33,16 +33,6 @@ class EventController extends Controller
|
|||
*/
|
||||
public function index(Request $request)
|
||||
{
|
||||
$eventsToDelete = Event::query()->get();
|
||||
|
||||
foreach ($eventsToDelete as $event) {
|
||||
if (date('Y-m-d H:i', strtotime('-1 day')) >= date('Y-m-d H:i', strtotime($event->date))) {
|
||||
UserEvent::query()->where('event_id', '=', $event->id)->delete();
|
||||
|
||||
$event->delete();
|
||||
}
|
||||
}
|
||||
|
||||
$events = Event::query()->orderBY('date' , 'asc')->get();
|
||||
|
||||
//returns the function with events index page and a parameter of events.
|
||||
|
|
Loading…
Reference in New Issue