### Install filament-short-url via Composer Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Installs the Filament Short URL plugin package. Requires PHP and Composer. The package depends on jeffersongoncalves/laravel-short-url (^2.0). ```bash composer require jeffersongoncalves/filament-short-url:"^3.0" ``` -------------------------------- ### Install optional dependencies for multi-tenancy and GeoIP Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Optional dependencies for automatic multi-tenancy (stancl/tenancy) and GeoIP via MaxMind (geoip2/geoip2). Without them, the corresponding features degrade gracefully; none are required. ```bash composer require stancl/tenancy ``` ```bash composer require geoip2/geoip2 ``` -------------------------------- ### Register FilamentShortUrlPlugin in PanelProvider Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Registers the FilamentShortUrlPlugin in a Filament PanelProvider. Shows optional configuration methods: navigationGroup, navigationLabel, navigationIcon, navigationSort, wizardForm, hideSecurity, hideUtm, hidePixels, hideTargeting, hideFolders, hideTags, authorizeUsing, authorizeSettingsUsing, resources, and hideStatistics. For simple installs, use ->simpleMode() instead of individual hideX() calls. ```php use JeffersonGoncalves\Filament\ShortUrl\FilamentShortUrlPlugin; public function panel(Panel $panel): Panel { return $panel ->plugins([ FilamentShortUrlPlugin::make() ->navigationGroup('Marketing') // optional — defaults to a translated "Short URL" ->navigationLabel('Short Links') // label for ShortUrlResource specifically ->navigationIcon('heroicon-o-link') ->navigationSort(50) ->wizardForm() // opt-in: Create AND Edit pages become a skippable step wizard ->hideSecurity() // drop the Security section (password/warning page) ->hideUtm() // drop the UTM Parameters section ->hidePixels() // drop the Pixels section ->hideTargeting() // drop rule-based/A-B split targeting — links become single-destination only ->hideFolders() // removes FolderResource + the folder filter/bulk action ->hideTags() // removes TagResource + the tags filter/bulk action ->authorizeUsing(fn () => auth()->user()->hasRole('admin')) ->authorizeSettingsUsing(fn () => auth()->user()->hasRole('admin')) ->resources([ \JeffersonGoncalves\Filament\ShortUrl\Resources\ShortUrlResource::class, // ...enable only the ones you want; see the full list below ]) ->hideStatistics(), // removes the Metrics page and the statistics action/column ]); } ``` -------------------------------- ### Run project tests, analysis, and formatting Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Run the project's test suite with Pest, static analysis with PHPStan (Larastan), and code formatting with Pint. ```bash composer test # Pest composer analyse # PHPStan (Larastan) composer format # Pint ``` -------------------------------- ### Publish and run core migrations Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Publishes the core package's config and migrations, then runs the migrations. The publish tags use the short-url-* prefix (not laravel-short-url-*) because the core strips the laravel- prefix when registering tags. Migrations ship as .php.stub files and are not auto-loaded. ```bash php artisan vendor:publish --tag="short-url-config" php artisan vendor:publish --tag="short-url-migrations" php artisan migrate ``` -------------------------------- ### Publish all core package assets Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Publishes everything at once: config, migrations, views, and translations for the core package. ```bash php artisan vendor:publish --provider="JeffersonGoncalves\LaravelShortUrl\LaravelShortUrlServiceProvider" ``` -------------------------------- ### Enable optional core features via .env Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Optional .env settings. SHORT_URL_DOMAINS_ENABLED enables custom domains (off by default; CustomDomainResource only appears once enabled). SHORT_URL_REQUIRED_UTM makes the specified UTM field required in the Filament form and enforced by ShortUrlManager on create/update. ```env SHORT_URL_DOMAINS_ENABLED=true ``` ```env SHORT_URL_REQUIRED_UTM=utm_medium ``` -------------------------------- ### Publish Filament assets Source: https://github.com/jeffersongoncalves/filament-short-url/blob/3.x/README.md Publishes Filament's assets after registering the plugin. ```bash php artisan filament:assets ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.