/** * @return mixed */ public function toOptionsArray() { if (!isset($this->options)) { $this->options = Permission::orderBy('name')->pluck('name', 'name')->toArray(); } return $this->options; }
public function getPermissions() { return Permission::all()->pluck('name', 'name')->toArray(); }