src/Eloquent/Model.php
public function accessibleAttributesToArray()
	{
		$filtered   = [];
		$attributes = $this->attributesToArray();

		foreach ($attributes as $key => $attribute) {
			$accessible = $this->access_authorizer->canAccess($key);

			if ($accessible) {
				$filtered[$key] = $attribute;
			}
		}

		return array_merge($filtered, $this->accessibleRelationsToArray());
	}
public function accessibleAttributesToArray()
	{
		$filtered   = [];
		$attributes = $this->attributesToArray();

		foreach ($attributes as $key => $attribute) {
			$accessible = $this->access_authorizer->canAccess($key);

			if ($accessible) {
				$filtered[$key] = $attribute;
			}
		}

		return array_merge($filtered, $this->accessibleRelationsToArray());
	}
public function accessibleAttributesToArray ( ) { $ filtered = [ ] ; $ attributes = $ this -> attributesToArray ( ) ; foreach ( $ attributes as $ key => $ attribute ) { $ accessible = $ this -> access_authorizer -> canAccess ( $ key ) ; if ( $ accessible ) { $ filtered [ $ key ] = $ attribute ; } } return array_merge ( $ filtered , $ this -> accessibleRelationsToArray ( ) ) ; }
Filter attributes which can and can't be accessed by the user

@return array
Filter attributes which can and can t be accessed by the user