Adel
Adel
FFilament
Created by Adel on 4/12/2025 in #❓┊help
Custom pages SEO?
No description
9 replies
FFilament
Created by Adel on 4/12/2025 in #❓┊help
Custom pages SEO?
No description
9 replies
FFilament
Created by Adel on 4/12/2025 in #❓┊help
Custom pages SEO?
No description
9 replies
FFilament
Created by Adel on 4/12/2025 in #❓┊help
Custom pages SEO?
Steps to do: 1. Create new panel ex. site 2. in SiteServiceProvider: a. remove Widgets\AccountWidget::class widget b. remove Authenticate::class middleware c. remove Dashboard::class page d. add the below functions to the panel chain
->id('site')
->path('/')
->login()
->registration()
->emailVerification(isRequired: false)
->profile()
->passwordReset()
->topNavigation()
->id('site')
->path('/')
->login()
->registration()
->emailVerification(isRequired: false)
->profile()
->passwordReset()
->topNavigation()
3. Create new Page HomePage and add it to SiteServiceProvider pages 4. add the below code to HomePage
class HomePage extends Page
{
protected static string $routePath = '/';

protected static ?string $slug = 'home';

protected ?string $heading = '';

protected static ?string $navigationIcon = 'heroicon-o-home';

protected static string $view = 'filament.site.pages.home-page';

public static function getRoutePath(): string
{
return static::$routePath;
}

public static function getNavigationLabel(): string
{
return __('Home');
}
}
class HomePage extends Page
{
protected static string $routePath = '/';

protected static ?string $slug = 'home';

protected ?string $heading = '';

protected static ?string $navigationIcon = 'heroicon-o-home';

protected static string $view = 'filament.site.pages.home-page';

public static function getRoutePath(): string
{
return static::$routePath;
}

public static function getNavigationLabel(): string
{
return __('Home');
}
}
5. create another Panel for user control panel ex. dashboard 6. add render hook to SitePanelProvider
->renderHook(PanelsRenderHook::GLOBAL_SEARCH_AFTER, fn (): View => view('filament.site.partials.global-search-after'))
->renderHook(PanelsRenderHook::GLOBAL_SEARCH_AFTER, fn (): View => view('filament.site.partials.global-search-after'))
content of global-search-after:
@guest
<x-filament::button
href="{{ route('filament.site.auth.login') }}"
tag="a"
outlined="true"
icon="heroicon-o-arrow-left-end-on-rectangle"
>
{{ __('Login') }}
</x-filament::button>
<x-filament::button
href="{{ route('filament.site.auth.register') }}"
tag="a"
icon="heroicon-o-user-plus"
>
{{ __('Join Us') }}
</x-filament::button>
@else
<x-filament::button
href="{{ route('filament.dashboard.pages.dashboard') }}"
tag="a"
icon="heroicon-o-cog-6-tooth"
:spa-mode="false"
:outlined="true"
>
{{ __('Dashboard') }}
</x-filament::button>
@endguest
@guest
<x-filament::button
href="{{ route('filament.site.auth.login') }}"
tag="a"
outlined="true"
icon="heroicon-o-arrow-left-end-on-rectangle"
>
{{ __('Login') }}
</x-filament::button>
<x-filament::button
href="{{ route('filament.site.auth.register') }}"
tag="a"
icon="heroicon-o-user-plus"
>
{{ __('Join Us') }}
</x-filament::button>
@else
<x-filament::button
href="{{ route('filament.dashboard.pages.dashboard') }}"
tag="a"
icon="heroicon-o-cog-6-tooth"
:spa-mode="false"
:outlined="true"
>
{{ __('Dashboard') }}
</x-filament::button>
@endguest
9 replies
FFilament
Created by Adel on 4/12/2025 in #❓┊help
Custom pages SEO?
Absolutely! Filament works great for guest users — you can take advantage of all its authentication features in no time. Plus, you’re free to use widgets however you like within the page view.
9 replies
FFilament
Created by Adel on 11/11/2024 in #❓┊help
custom field styling
@ModestasV Thanks
5 replies
FFilament
Created by Adel on 11/9/2024 in #❓┊help
redirect new registered users to additional registration wizard
Yea this was the issue. Thanks @awcodes
6 replies
FFilament
Created by Adel on 11/9/2024 in #❓┊help
redirect new registered users to additional registration wizard
<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class CreateTreeIfNotExists
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
dump('create tree if not exists');

if(auth()->check() && !auth()->user()->trees()->exists()) {
return redirect()->route('filament.dashboard.pages.trees.wizard');
}

return $next($request);
}
}
<?php

namespace App\Http\Middleware;

use Closure;
use Illuminate\Http\Request;
use Symfony\Component\HttpFoundation\Response;

class CreateTreeIfNotExists
{
/**
* Handle an incoming request.
*
* @param \Closure(\Illuminate\Http\Request): (\Symfony\Component\HttpFoundation\Response) $next
*/
public function handle(Request $request, Closure $next): Response
{
dump('create tree if not exists');

if(auth()->check() && !auth()->user()->trees()->exists()) {
return redirect()->route('filament.dashboard.pages.trees.wizard');
}

return $next($request);
}
}
6 replies
FFilament
Created by Adel on 11/9/2024 in #❓┊help
redirect new registered users to additional registration wizard
the targeted user is logged in users
6 replies
FFilament
Created by Adel on 4/14/2024 in #❓┊help
Show array of urls in ImageEntry
@krekas yes
5 replies
FFilament
Created by Adel on 12/23/2023 in #❓┊help
how to combine live() with money mask()
live(debounce: 1000)
4 replies