Closed pxpm closed 1 year ago
Note: we should review the final syntax so that I can update this branch with the correct definitions to work in demo.
Let's finish this PR to use the latest media syntax 💪
@tabacitu testing notes.
This requires: https://github.com/Laravel-Backpack/CRUD/pull/4921
Everything should be configured in this PR, just don't forget to php artisan migrate
, and clear configs in case you are caching them: php artisan config:clear
.
This should work out-of-the-box! 🙏
I've just gone through this PR and "refreshed" it:
v6
instead of main
v6
into itcomposer update
And I can confirm it is working WONDERFULLY:
There's only one thing I didn't do, that's preventing me from merging this is. We don't have a stopping mechanism for the online demo 👀 @pxpm could you please prevent people from actually uploading, when this is in production? We can probably bind/intercept all uploaders in production, to prevent the uploads... right?! 🤷♂️
Thanks for moving this foward, was my next on line 🙏
We can probably bind/intercept all uploaders in production, to prevent the uploads... right?!
Will investigate the best course of action here.
This is pending https://github.com/Laravel-Backpack/medialibrary-uploaders/pull/17
As soon as that gets merged I think we are good to go here.
@tabacitu can you give this a double check in the production constrains to don't upload files ?
Cheers
Tested, works, merging 🎉
Let's postpone the other 2 suggestions, they're COULDs/SHOULDs. Added issues for them for later in the year:
WHY
BEFORE - What was wrong? What was happening before this PR?
No working examples on how to use Spatie Media Library with our fields.
Installation steps: 1) You should do a
composer update
first to get media library installed, I already added it tocomposer.json
2) There is a new disk onfilesystems.php
along with links. If you are caching your configs, make sure tophp artisan config:clear
. 3) Migrations are added/modified, so do aphp artisan migrate:fresh --seed
4) setup the folder link:php artisan storage:link
You should be good to go. Navigate to Products Crud, you should see something like:
AFTER - What is happening after this PR?
We should now evaluate the steps taken to use Spatie Media Library and brainstorm a way to make developers life easier. I see there is a lot of "repetitive" work that we can automate.