demo
demo copied to clipboard
Add example for all 50+ column types (both CRUD and PRO)
WHY
BEFORE - What was wrong? What was happening before this PR?
We only had examples for 20+ column types, because that's all we had.
AFTER - What is happening after this PR?
There are two PRs that bring feature-parity between fields and columns. Basically, each CRUD and PRO field now has a corresponding column type, with the same name:
- https://github.com/Laravel-Backpack/CRUD/pull/4675
- https://github.com/Laravel-Backpack/PRO/pull/91
This PR makes it easy to all those column types that those PRs add.
HOW
How did you achieve that, in technical terms?
Added new CrudController, ColumnMonsterCrudController, that basically uses fields definitions to add columns. That way, we also test that the syntax for fields works for its corresponding column too.
Is it a breaking change or non-breaking change?
Non-Breaking change
How can we test the before & after?
- checkout this PR on the demo
- go to
vendor/backpack/crudand checkout PR https://github.com/Laravel-Backpack/CRUD/pull/4675 - go to
vendor/backpack/proand checkout PR https://github.com/Laravel-Backpack/PRO/pull/91 - in your browser, go to
/admin/column-monsterand play around - see all columns work
BOOM! Your first PR with us, thank you so much! Someone will take a look at it shortly.
Please keep in mind that:
- if this constitutes a breaking change, it might take quite a while for this to get merged; we try to emulate the Laravel release cycle as much as possible, so developers can upgrade both software once; this means a new big release every ~6 months;
- even if it's a non-breaking change, it might take a few days/weeks for the PR to get merged; unless it's a no-brainer, we like to have some community feedback on new features, before we merge them; this leads to higher-quality code, in the end; we learnt this the hard way :-)
- not all PRs get merged; sometimes we just have to hold out new features, to keep the packages lean; sometimes we don't include features that only apply to niche use cases;
- we're not perfect; if you think we're wrong, call us out on it; but in a kind way :-) we all make mistakes, best we learn from them and build better software together;
Thank you!
-- Justin Case The Backpack Robot
Here's an export of my monsters table, so you can get the same results as I did:
Pedro - please make sure that every time you push to this branch, you double-check that the assets are the ones from the main branch. We cannot have this branch show changes to 238 files (CSS and JS assets), the 50 blade files are way more than enough to keep us busy and confused 😀
I'm telling you that because, as I remember it, I had just fixed that problem last week, then you added another push, 258 files changed again. No bueno - Jorge can't reasonably be expected to review this with so many changes.
Hi @pxpm i check this PR.
Now i see an error with column align.
On /admin/column-monster at the start, everything look perfect.

Then from select align starting to be move:

At the upload column is impossible to see correctly:

When you go to the end of row, from color picker everything look correctly align again:

I check in detail each column, but a lot of them are "fake" and didnt load correctly value con column list, per example "Select_grouped".
Cheers.
Hi @pxpm add to last revision there is this column miss:
Is not in any CRUD:
- google_map
Is not in monster CRUD:
- repeatable
- wysiwyg
Cheers.
Jorge and I decided it's better for @jorgetwgroup to take this feature to the finish line.

Hi @tabacitu
This PR is now ready, i add all fields to Monsters, thats mean this:
- address_algolia
- address_google
- base64_image
- browse
- browse_multiple
- checkbox
- checklist
- ckeditor
- color
- color_picker
- custom_html
- date
- date_picker
- date_range
- datetime
- datetime_picker
- easymde
- enum
- google_map
- hidden
- icon_picker
- image
- month
- number
- password
- phone
- radio
- range
- relationship
- repeatable
- select
- select_and_order
- select_from_array
- select_grouped
- select_multiple
- select2
- select2_from_ajax
- select2_from_ajax_multiple
- select2_from_array
- select2_grouped
- select2_multiple
- select2_nested
- slug
- summernote
- switch
- table
- text
- textarea
- time
- tinymce
- upload
- upload_multiple
- url
- video
- week
- wysiwyg
I test and add all this columns to Monsters:
- address_algolia
- address_google
- base64_image
- browse
- checkbox
- checklist
- ckeditor
- color
- color_picker
- custom_html
- date
- date_picker
- datetime
- datetime_picker
- easymde
- enum
- google_map
- icon_picker
- image
- month
- number
- phone
- radio
- range
- relationship
- select
- select_and_order
- select_from_array
- select_grouped
- select_multiple
- select2
- select2_from_ajax
- select2_from_array
- select2_grouped
- select2_multiple
- select2_nested
- slug
- summernote
- table
- text
- textarea
- time
- tinymce
- upload
- upload_multiple
- url
- video
- week
- wysiwyg
And this columns too:
- boolean
- check
- checkbox
- closure
- custom_html
- date
- datetime
- enum
- image
- json
- model_function
- model_function_attribute
- multidimensional_array
- number
- phone
- radio
- relationship_count
- row_number
- select
- select_from_array
- select_multiple
- text
- textarea
- upload_multiple
- array
- array_count
- markdown
- relationship
- table
- video
I fix "time" column format on this PR: https://github.com/Laravel-Backpack/CRUD/pull/4910
Let me know if i miss anything.
Cheers.
Im sorry im forget to say this need to execute "php artisan migrat" because add new columns to monsters.
Cheers.
Just an heads-up before merging this into v6 branch. Should we rip of algolia ?
I think we should. Ping @tabacitu
We totally should, but I don't think it's got anything to do with this PR. This is about columns. We can do that in a separate PR, it'll be easier.
Gave this another test, a few fixes. Merging to v6 🎉
WHOOP-WHOOP! Congrats, your first PR on this repo has officialy been merged.

If you want to help out the community in other ways, you can:
- give your opinion on other Github Issues & PRs;
- chat with others in the Gitter Chatroom (usually for quick help: How do I do X);
- answer Backpack questions on Stackoverflow; you get points, people get help; you can subscribe to the
backpack-for-laraveltag by adding a new filter; that will send you emails when new questions come up with our tag;
Again. Thank you for the PR. You are a wonderful person. Keep 'em coming :-) Cheers!
-- Justin Case The Backpack Robot
P.S. Help in the Backpack community is rewarded with free Backpack commercial licenses. It's the least we can do. If you feel you've helped the community with PRs, help & other stuff, please shoot Tabacitu an email and ask him if you qualify for free licenses. You scratch my back, I scratch your back. Thank you!