F
Filament16mo ago
iluisfr

Changing color not working on service provider

Trying to set the base colors in AppServiceProvider.php: <?php namespace App\Providers; use Filament\Support\Colors\Color; use Filament\Support\Facades\FilamentColor; use Illuminate\Support\ServiceProvider; class AppServiceProvider extends ServiceProvider { /** * Register any application services. * * @return void */ public function register() { // } /** * Bootstrap any application services. * * @return void */ public function boot() { FilamentColor::register([ 'danger' => Color::Red, 'gray' => Color::Zinc, 'info' => Color::Blue, 'primary' => Color::Amber, 'success' => Color::Green, 'warning' => Color::Amber, ]); } } Im getting the image error. Am I missing something? Thanks for any help!!
8 Replies
Dennis Koch
Dennis Koch16mo ago
Are you on v2 or v3? You selected both. And you are using standalone table builder? No panel? Where did you find that piece of code you are using?
iluisfr
iluisfrOP16mo ago
Dennis Koch
Dennis Koch16mo ago
And is there an error in the browser or only Intellephense complaning?
iluisfr
iluisfrOP16mo ago
The erorrs is in both, navigating I get Class "Filament\Support\Facades\FilamentColor" not found It is like the library is not present
Dennis Koch
Dennis Koch16mo ago
What's the version you are using? artisan about
iluisfr
iluisfrOP16mo ago
checking again im working on the v2 version. It is the artisan about: Environment Application Name Assets CF Laravel Version ...... 9.52.14 PHP Version ............ 8.2.9 Composer Version ....... 2.5.8 Environment ............ local Debug Mode .......... ENABLED URL ... assets.cf.es Maintenance Mode ......... OFF Cache Config ............ NOT CACHED Events ............ NOT CACHED Routes ............ NOT CACHED Views ................. CACHED Drivers Broadcasting ............. log Cache ................... file Database ............... mysql Logs .......... stack / single Mail .................... smtp Queue ................... sync Session .................. file Filament Packages .................... filament, forms, notifications, support, tables Version ............. v2.17.51 Views .......... NOT PUBLISHED Thanks again for your help!!
awcodes
awcodes16mo ago
looks like you didn't actually upgrade. it's showing v2 not v3, and you won't be able to update to the latest v3 without updating to Laravel 10 first.
Want results from more Discord servers?
Add your server