When using layout('filament::components.layouts.card') custom theme isn't applied

*Hi, I already asked this question on GitHub but did not get a response. In the meantime I wasn't able to figure it out. Hopefully it is okay to ask this question once again on here. If not, let me know, I'll delete this post. * Hi, When I create a custom Livewire route with the code below my filament custom colors are not applied.
<?php

namespace App\Http\Livewire;

use Livewire\Component;

class AccountInactive extends Component
{
public function render()
{
return view('auth.account-inactive')
->layout('filament::components.layouts.card', [
'title' => __('Account Inactief'),
]);
}
}
<?php

namespace App\Http\Livewire;

use Livewire\Component;

class AccountInactive extends Component
{
public function render()
{
return view('auth.account-inactive')
->layout('filament::components.layouts.card', [
'title' => __('Account Inactief'),
]);
}
}
Would it be possible to use the filament card with the theme colors? https://github.com/filamentphp/filament/discussions/6412
GitHub
When using layout('filament::components.layouts.card') custom color...
Hi, When I create a custom Livewire route with the code below my filament custom colors are not applied. <?php namespace App\Http\Livewire; use Livewire\Component; class AccountInactive extends ...
4 Replies
Andrew Wallo
Andrew Wallo2y ago
If you are using fortify, make sure to apply “config(‘filament.middleware.base’)” to the fortify middleware.
Proculair B.V.
Proculair B.V.OP2y ago
I am not using fortify, just the normal laravel&filament auth with my custom password reset page.
wyChoong
wyChoong2y ago
how did you register your route did you add filament middleware? ->middleware(config('filament.middleware.base'))
Proculair B.V.
Proculair B.V.OP2y ago
I registered my route like this:
Route::middleware('guest')->group(function () {
Route::get('reset-password/{token}', ResetPassword::class)->name('password.reset');
Route::get('account-inactive', AccountInactive::class)->name('account.inactive');
});
Route::middleware('guest')->group(function () {
Route::get('reset-password/{token}', ResetPassword::class)->name('password.reset');
Route::get('account-inactive', AccountInactive::class)->name('account.inactive');
});
Good idea, I will try this Yeah that solved it. I changed my routes to the following:
Route::middleware(['guest', ...config('filament.middleware.base')])->group(function () {
Route::get('reset-password/{token}', ResetPassword::class)->name('password.reset');
Route::get('account-inactive', AccountInactive::class)->name('account.inactive');
});
Route::middleware(['guest', ...config('filament.middleware.base')])->group(function () {
Route::get('reset-password/{token}', ResetPassword::class)->name('password.reset');
Route::get('account-inactive', AccountInactive::class)->name('account.inactive');
});
Want results from more Discord servers?
Add your server