setTheme

setTheme(string $theme)

The setTheme function in Grocery CRUD enables you to customize the visual theme of your CRUD interface. As of now, Grocery CRUD offers only two themes, but we have plans to introduce more themes in the future. Please note that a theme involves the entire HTML, JS, and CSS structure, not just color changes. The syntax for using this function is straightforward:

$crud->setTheme('myTheme')

You have the option to select from two available themes:

In the future (but it is too early to give any roadmap) we would like to introduce 3 more themes:

Example

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