src/Palmabit/Authentication/Presenters/GroupPresenter.php
public function permissions_obj($model = null) {
    $model = $model ? $model : new Permission;
    $objs = [];
    $permissions = $this->resource->permissions;
    if (!empty($permissions)) {
      foreach ($permissions as $permission => $status) {
        $objs[] = (!$model::wherePermission($permission)->get()->isEmpty()) ? $model::wherePermission($permission)->first() : null;
      }
    }
    return $objs;
  }
public function permissions_obj($model = null) {
    $model = $model ? $model : new Permission;
    $objs = [];
    $permissions = $this->resource->permissions;
    if (!empty($permissions)) {
      foreach ($permissions as $permission => $status) {
        $objs[] = (!$model::wherePermission($permission)->get()->isEmpty()) ? $model::wherePermission($permission)->first() : null;
      }
    }
    return $objs;
  }
public function permissions_obj ( $ model = null ) { $ model = $ model ? $ model : new Permission ; $ objs = [ ] ; $ permissions = $ this -> resource -> permissions ; if ( ! empty ( $ permissions ) ) { foreach ( $ permissions as $ permission => $ status ) { $ objs [ ] = ( ! $ model :: wherePermission ( $ permission ) -> get ( ) -> isEmpty ( ) ) ? $ model :: wherePermission ( $ permission ) -> first ( ) : null ; } } return $ objs ; }
Obtains the permission obj associated to the model

@param null $model
@return array
Obtains the permission obj associated to the model