Devise\Pages\Collections\CollectionsManager::updateInstanceName PHP Method

updateInstanceName() public method

Update the collection instance name
public updateInstanceName ( $id, $name ) : CollectionInstance
return CollectionInstance
    public function updateInstanceName($id, $name)
    {
        $instance = $this->CollectionInstance->findOrFail($id);
        $instance->name = $name;
        $instance->save();
        return $instance;
    }

Usage Example

Beispiel #1
0
 /**
  * Renames the instance with a better, faster, more improved name.
  *
  * @param  integer $pageVersionId
  * @param  integer $collectionInstanceId
  * @param  array $input
  * @return void
  */
 public function renameInstance($pageVersionId, $collectionInstanceId, $input)
 {
     $this->CollectionsManager->updateInstanceName($collectionInstanceId, $input['name']);
 }