setRead

setRead(void)

The view of the form (read only) is false by default. In order to enable the "View" button at your grid you will need to use the function setRead.

The usage is simple:

$crud->setRead()

You can see a simple and fully working example below:

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

$output = $crud->render();

The result of the above code can be found below. As you can also see in order to have more space the grid is creating the "More" button in order to fit efficiently the "View" Button.