unsetEdit

unsetEdit(void)

The method unsetEdit is removing completely the Edit operation for the end-user. More specifically:

  1. It is removing the button "Edit"
  2. The user doesn't have the ability to Update any data even if they try to do it by having the URL of the API (e.g. the permission is not allowed)

The syntax is simple. You can find an example below:

$crud->unsetEdit();

Example

You can also see a full working example:

$crud->setTable('customers');
$crud->setSubject('Customer', 'Customers');
$crud->columns(['customerName','phone','addressLine1','creditLimit']);
$crud->unsetEdit();

$output = $crud->render();

You can see the results of the above example here. As you can see by your own, the operation Edit is completely removed: