By default, you only need one parameter which acts as the header of the column, the field which it references will be acquired using Str::snake.
So if you have:
1publicfunctioncolumns():array
2{
3return[
4Column::make('Name'),// Looks for column `name`
5Column::make('Email'),// Looks for column `email`
6];
7}
Of course, this won't work in every situation, for example if you have an ID column, Str::snake will convert it to i_d which is incorrect. For this situation and any other situation where you want to specify the field name, you can pass it as the second parameter:
1publicfunctioncolumns():array
2{
3return[
4Column::make('ID','id'),
5Column::make('E-mail','email'),
6];
7}
Global search
Find something useful.
Start with two characters.Search the open-source catalog, article library, and code snippets.