This was another good month for the Backpack team. We’ve been steadily working towards a stable v6, that you’ll be able to try pretty s...
This was another good month for the Backpack team. We’ve been steadily working towards a stable v6, that you’ll be able to try pretty soon. Until then, we’ve also added two small features to CRUD v5, that you can use right away!
Since our last progress report, we've pushed to:
This month we’ve been able to finally tackle one feature request that’s been on our board for more than 3 years… and to add a brand-new feature:
It looks and works just as you’d expect, because we made it super-similar to the Tabs in Create & Update:
public function setupShowOperation()
{
CRUD::setOperationSetting('tabsEnabled', true);
CRUD::column('name')->tab('General');
CRUD::column('description')->tab('Another one');
}
Of course, tabs are optional. You don’t use them… you don’t see them. For more information, check out their docs here. Kudos to Mauro & Pedro for this one 👏👏👏
when()
and unless()
to your definitionsBecause we’ve added Laravel’s Conditionable on our classes, if you're using Backpack's fluent syntax, you can now do stuff like:
CRUD::field('email')
->label('Email')
->when($condition, function ($field) {
$field->hint('My hint');
});
and:
CRUD::column('name')
->unless($condition, function ($column) {
$column->wrapper([
'href' => function ($crud, $column, $entry, $related_key) {
return backpack_url('category/'.$related_key.'/show');
},
])
});
Simple conditionals are now so much easier to write! This applies to Fields, Columns, Buttons and Filters! Check out their docs here. You’ll have to thank Ziming and Mauro for this one! As well as Pedro, who’s now the official “merger” for v5. You’ll have him to thank for us merging more features nowadays!
We’ve been in private alpha for a while now… and still are. So no, we’re not asking you to give it a shot… yet! But we have finished a few more big features. We’re super proud of them, and we think you’ll love them too:
Handling file uploads… in any web framework, is quite time-consuming. Well… not any more! We’ve previously made it easier to upload using the image
, upload
and upload_multiple
fields using a mutator in the Model. That worked ok until now… but we’ve got an even better way:
CRUD::field('document')->type('upload')->withFiles();
CRUD::field('attachments')->type('upload_multiple')->withFiles();
CRUD::field('profile_image')->type('image')->withFiles();
That’s it! That’s all you’ll need to do, in most cases, to store uploads on disk and the filepath inside the database column 😀 That’s crazy-easy, right? Of course, it’s also super-configurable… but we’ll leave that part for when it’s launched 😉 You’ll have to thank Pedro for this one, he’s the mastermind behind it! Coming soon in Backpack v6!
What happens if you don’t want to store the filepath to a database column… but you want all media filepaths stored in a separate table? Well... most likely you’re already using spatie/laravel-medialibrary. It’s the de-facto solution for this. And starting with v6… Backpack will make it dead-simple to work with it, using the same fields you know and love:
CRUD::field('document')->type('upload')->withMedia();
CRUD::field('attachments')->type('upload_multiple')->withMedia();
CRUD::field('profile_image')->type('image')->withMedia();
That’s ridiculously easy, right? 😀 Same here - very configurable. You’ll see when v6 is out, and its docs too. Again, Pedro was the one that has made this happen 👏👏👏 Coming soon in Backpack v6!
Pedro and Jorge have been working a few BIG things. Something that took us 3+ months to figure out. We've taken something you've asked for... to a whole new level. But you know what? I'm not going to tell you what it is yet 😀 You'll have to subscribe to our blog digest or follow us on Twitter to find out 😀 Coming soon in Backpack v6!
Stay tuned. We have GREAT things coming soon!
Thanks for using Backpack. We love doing this for you. Cheers!
Subscribe to our "Article Digest". We'll send you a list of the new articles, every week, month or quarter - your choice.
What do you think about this?
Wondering what our community has been up to?