app/Http/Controllers/loketController.php
/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display a listing of the resource.
@return \Illuminate\Http\Response
Display a listing of the resource . @return \ Illuminate \ Http \ Response
public function index(Request $request)
    {
        $getDate = Customer::first();
        if ($getDate) {
            $oldDate = date('d-m-Y', strtotime('+1 days', strtotime($getDate->created_at)));
            $nowDate = date('d-m-Y');   
            if (strtotime($nowDate) >= strtotime($oldDate)) {
                Customer::truncate();
                Antrian::truncate();
            }
        }
        return view('admin.loket.index');
    }
public function index ( Request $ request ) { $ getDate = Customer :: first ( ) ; if ( $ getDate ) { $ oldDate = date ( 'd-m-Y' , strtotime ( '+1 days' , strtotime ( $ getDate -> created_at ) ) ) ; $ nowDate = date ( 'd-m-Y' ) ; if ( strtotime ( $ nowDate ) >= strtotime ( $ oldDate ) ) { Customer :: truncate ( ) ; Antrian :: truncate ( ) ; } } return view ( 'admin.loket.index' ) ; }
Display a listing of the resource.
Display a listing of the resource .