laravel-code-generator icon indicating copy to clipboard operation
laravel-code-generator copied to clipboard

search page for index

Open danmorph opened this issue 7 years ago • 0 comments

Environment:

  • Laravel-Code-Generator Version:2.2
  • Laravel Version: 5.6

Description:

Excuse me if this has already been suggested/requested (it seems a bit obvious), but wouldn't it be nice to have search filters on your index page, along with paging and sorting smarts?

So if we took the case of Singers, as in your youtube video, the natural filters would be on the name, gender, music type and is_retired fields. The name would be a text control, and the music type field would be a select control and I guess the gender and is_retired fields could be select or radio button controls. These would not be hard to configure in the json, and in some cases may logically follow from whatever you have configured on the edit page for them.

The column headers could be clickable to sort (click once to sort a-z, twice for z-a) If there are enough records then show some paging and persist the filters on the ensuing pages. Let's say you have 100 records, and show 25 per page, there are 4 pages. If you filter on some text string then it might come down to 31 records, so there are 25 on first page and 6 on 2nd page.

Cheers and thanks for the excellent work!

danmorph avatar Sep 03 '18 04:09 danmorph