1. Go to this page and download the library: Download porro/filament-connector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
porro / filament-connector example snippets
use Porro\Filament\PorroPlugin;
public function panel(Panel $panel): Panel
{
return $panel
// ...
->plugin(PorroPlugin::make());
}
PorroPlugin::make()
->widget(false) // no dashboard widget
->navigationGroup('Settings') // instead of "Porro": the pages become "Porro Site Health" and "Porro Blocking"
->navigationSort(90)
->authorize(fn ($user) => $user->can('view site health'))
->authorizeManage(fn ($user) => $user->can('block ips')); // who can block and safelist
use Illuminate\Support\Facades\Gate;
Gate::define('viewPorroSiteHealth', fn (User $user) => in_array($user->email, ['[email protected]']));