Download the PHP package zoker/filament-multisite without Composer
On this page you can find all versions of the php package zoker/filament-multisite. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zoker/filament-multisite
More information about zoker/filament-multisite
Files in zoker/filament-multisite
Package filament-multisite
Short Description Multisite plugin for Laravel with Filament managing
License MIT
Informations about the package filament-multisite
Filament Multisite
Manage multiple sites within a single Laravel application with first‑class Filament integration.
The package provides:
- Multi‑site routing (domains / prefixes / locales)
- Localized routes and helpers for URL generation
- Per‑site models via
HasMultisite - Filament admin integration with site switching
Requirements
- PHP 8.4+
- Laravel 12+
- Filament 4+ (for admin panel integration)
Installation
-
Install the package
-
Publish and run migrations
-
Register the Filament plugin
In your Filament panel configuration:
Frontend usage
Defining multisite routes
Create site‑specific routes in routes/web.php using the multisite macro:
Translatable routes
Use the translatable macro for localized paths. Translation keys should be placed in your application's resources/lang directory:
Generating URLs
Use the multisite_route() helper to generate URLs that respect the current site and locale:
Managing the current site (frontend)
Facade: SiteManager
Helper: currentSite()
Middleware
Use middleware to automatically resolve the current site from the request:
You can also register the middleware in the web group.
Filament integration
Site switching in Filament
In Filament the active site is managed via the FilamentSiteManager. The currently selected site is stored in the session and is used automatically by models with the HasMultisite trait when Filament is serving the request.
Add the SiteSwitcher action to your Filament resources:
Translatable models
To use translatable models, add the HasTranslations trait to your model and define the translatable attributes.
These attributes must be stored in JSON columns in your database.
php use Illuminate\Database\Eloquent\Model; use Zoker\FilamentMultisite\Traits\HasMultisite;
class YourModel extends Model { use HasMultisite; } blade
blade
bash php artisan vendor:publish --tag=multisite-config bash composer test
All versions of filament-multisite with dependencies
php Version ^8.4
lara-zeus/spatie-translatable Version ^2.0
filament/filament Version ^5.0