public function givePermissionTo(SitePermission $permission) { if (is_string($permission)) { return $this->permissions()->save(SitePermission::whereName($permission)->firstOrfail); } return $this->permissions()->save($permission); }