protected function initializeProperties($model, $class)
    {
        $this->class = $class;
        $this->modelObject = new $model();
        $this->primaryColumn = $this->modelObject->getKeyName();

        $requestData = collect(request()->all());
        $this->requestedColumns = collect($requestData->get('columns'));
    }
protected function initializeProperties($model, $class)
    {
        $this->class = $class;
        $this->modelObject = new $model();
        $this->primaryColumn = $this->modelObject->getKeyName();

        $requestData = collect(request()->all());
        $this->requestedColumns = collect($requestData->get('columns'));
    }
protected function initializeProperties ( $ model , $ class ) { $ this -> class = $ class ; $ this -> modelObject = new $ model ( ) ; $ this -> primaryColumn = $ this -> modelObject -> getKeyName ( ) ; $ requestData = collect ( request ( ) -> all ( ) ) ; $ this -> requestedColumns = collect ( $ requestData -> get ( 'columns' ) ) ; }
Initializes class properties.

@param \Illuminate\Database\Eloquent\Model The model to work on
@param Class to customize query/data/logic

@return void
Initializes class properties .