Specifying the fields that can't be edited and will only be viewed. The rule will be the same for the insert and update operations.
The below code:
$crud->setTable('customers'); $crud->setSubject('Customer', 'Customers'); $crud->readOnlyFields(['salesRepEmployeeNumber','creditLimit']);
Will have as a result the following output: