LeChatSoeur
LeChatSoeur
FFilament
Created by LeChatSoeur on 4/16/2024 in #❓┊help
spatie media User
Hi, I have a somewhat silly question but I must ask it because I'm stuck! I installed the Spatie media plugin. Everything went smoothly, I set up my 'form component' which contains only the option to upload, since I don't need anything else. I have also prepared my model as stipulated in the documentation. *I want each user to be able to have their own media library So, the model_type and model_id should correspond to my User model. But... the model_type and model_id are causing me serious issues. error: SQLSTATE[HY000]: General error: 1364 Field 'model_type' doesn't have a default value php Copy code SpatieMediaLibraryFileUpload::make('image') ->directory(function () { $userId = auth()->check() ? auth()->id() : 'default'; return 'user_uploads/' . $userId; }) ->multiple() ->reorderable() ->responsiveImages() ->disk('public') ]; Does anyone have the solution? Laravel 10 filament 3.2 spatie media 11
6 replies
FFilament
Created by LeChatSoeur on 4/10/2024 in #❓┊help
Using Media Library Manager with Imagick and Filament 3 in Laravel
I'm working on a Laravel project and I'm looking to integrate the Media Library Manager, which requires the PHP extension imagick. However, I'm facing a dilemma: imagick seems to be only compatible with PHP up to version 8.1, while Filament 3 requires PHP version 8.1.2. How can I configure my environment to use both imagick and Filament 3, given this PHP version constraint? Is there a way to keep imagick functional while taking advantage of Filament 3 features in Laravel? Any help or suggestion would be greatly appreciated, thank you!
6 replies
FFilament
Created by LeChatSoeur on 4/2/2024 in #❓┊help
custom theme
Hello, when I create a custom theme (php artisan make:filament-theme) and configure my vite.js file along with my panelAdminProvider.php, all the CSS disappears from my dashboard. And when I add CSS, for it to be recognized, I have to run npm run build. I'm doing exactly as the documentation and numerous explanations on the internet suggest.I'm on Laravel 11. Could that be the cause? I've tried on my current project and a brand new project. Always the same problem.😑
6 replies