src/Repositories/Repository.php
public function getForUser($user_id = null)
    {
        if ($user_id) {
            return $this->model->whereUserId($user_id)->get()->first()->toArray();
        }

        if(auth()->user()){
            return $this->model->whereUserId(auth()->user()->id)->first()->toArray();
        }


        return null;
    }
public function getForUser($user_id = null)
    {
        if ($user_id) {
            return $this->model->whereUserId($user_id)->get()->first()->toArray();
        }

        if(auth()->user()){
            return $this->model->whereUserId(auth()->user()->id)->first()->toArray();
        }


        return null;
    }
public function getForUser ( $ user_id = null ) { if ( $ user_id ) { return $ this -> model -> whereUserId ( $ user_id ) -> get ( ) -> first ( ) -> toArray ( ) ; } if ( auth ( ) -> user ( ) ) { return $ this -> model -> whereUserId ( auth ( ) -> user ( ) -> id ) -> first ( ) -> toArray ( ) ; } return null ; }
get the columns for a users

@param  int  $user
@return Model
get the columns for a users