public function confirmDeletionMultipleRows(Request $request) {

        $checkboxes = $request->input('checkbox');

        if (!$checkboxes) {
            // flash message with redirect
            Session::flash('status_code', 400 );
            $message = 'You have not selected any rows for deletion.';
            Session::flash('message', $message);
            return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
        }


        // Prepare array of records

        // i) flatten the array (https://laravel.com/docs/5.1/helpers#method-array-flatten)
        $flattenedChecklistArray = array_flatten($checkboxes);

        // ii) find multiple records
        $records = $this->model->findMany($flattenedChecklistArray);

        return view('formhandling::adminformhandling/' . config('lasallecmsadmin.admin_template_name') . '/delete_confirmMultipleRows',
            [
                'user'                         => Auth::user(),
                'repository'                   => $this->repository,
                'records'                      => $records,
                'package_title'                => $this->model->package_title,
                'table_name'                   => $this->model->table,
                'model_class'                  => $this->model->model_class,
                'checkboxes'                   => $checkboxes,
                'resource_route_name'          => $this->model->resource_route_name,
                'HTMLHelper'                   => HTMLHelper::class,
                'Config'                       => Config::class,
                'Form'                         => Form::class,
            ]);
    }
public function confirmDeletionMultipleRows(Request $request) {

        $checkboxes = $request->input('checkbox');

        if (!$checkboxes) {
            // flash message with redirect
            Session::flash('status_code', 400 );
            $message = 'You have not selected any rows for deletion.';
            Session::flash('message', $message);
            return Redirect::route('admin.'.$this->model->resource_route_name.'.index');
        }


        // Prepare array of records

        // i) flatten the array (https://laravel.com/docs/5.1/helpers#method-array-flatten)
        $flattenedChecklistArray = array_flatten($checkboxes);

        // ii) find multiple records
        $records = $this->model->findMany($flattenedChecklistArray);

        return view('formhandling::adminformhandling/' . config('lasallecmsadmin.admin_template_name') . '/delete_confirmMultipleRows',
            [
                'user'                         => Auth::user(),
                'repository'                   => $this->repository,
                'records'                      => $records,
                'package_title'                => $this->model->package_title,
                'table_name'                   => $this->model->table,
                'model_class'                  => $this->model->model_class,
                'checkboxes'                   => $checkboxes,
                'resource_route_name'          => $this->model->resource_route_name,
                'HTMLHelper'                   => HTMLHelper::class,
                'Config'                       => Config::class,
                'Form'                         => Form::class,
            ]);
    }
public function confirmDeletionMultipleRows ( Request $ request ) { $ checkboxes = $ request -> input ( 'checkbox' ) ; if ( ! $ checkboxes ) { // flash message with redirect Session :: flash ( 'status_code' , 400 ) ; $ message = 'You have not selected any rows for deletion.' ; Session :: flash ( 'message' , $ message ) ; return Redirect :: route ( 'admin.' . $ this -> model -> resource_route_name . '.index' ) ; } // Prepare array of records // i) flatten the array (https://laravel.com/docs/5.1/helpers#method-array-flatten) $ flattenedChecklistArray = array_flatten ( $ checkboxes ) ; // ii) find multiple records $ records = $ this -> model -> findMany ( $ flattenedChecklistArray ) ; return view ( 'formhandling::adminformhandling/' . config ( 'lasallecmsadmin.admin_template_name' ) . '/delete_confirmMultipleRows' , [ 'user' => Auth :: user ( ) , 'repository' => $ this -> repository , 'records' => $ records , 'package_title' => $ this -> model -> package_title , 'table_name' => $ this -> model -> table , 'model_class' => $ this -> model -> model_class , 'checkboxes' => $ checkboxes , 'resource_route_name' => $ this -> model -> resource_route_name , 'HTMLHelper' => HTMLHelper :: class , 'Config' => Config :: class , 'Form' => Form :: class , ] ) ; }
Confirm multiple row deletions

@return Response
Confirm multiple row deletions