PHP code example of zvive / filament-auth
1. Go to this page and download the library: Download zvive/filament-auth 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/ */
zvive / filament-auth example snippets
php artisan vendor:publish --provider="Spatie\Permission\PermissionServiceProvider"
php artisan migrate
public function canAccessFilament() : bool
{
// Change this per your
php artisan vendor:publish --provider="Silber\Bouncer\BouncerServiceProvider"
php artisan migrate
public function canAccessFilament() : bool
{
// Change this per your
protected $policies = [
Role::class => RolePolicy::class,
Permission::class => PermissionPolicy::class,
CustomPage::class => CustomPagePolicy::class,
SettingsPage::class => SettingsPagePolicy::class
// 'App\Models\Model' => 'App\Policies\ModelPolicy',
];
'Widgets' => [
'LatesetUsers' => [
'enabled' => true,
'limit' => 5,
],
],
namespace App\Filament\Pages;
use Filament\Pages\Page;
use FilamentAuth\Pages\Profile as PagesProfile;
class Profile extends PagesProfile
{}
bash
php artisan optimize:clear
bash
php artisan vendor:publish --tag=filament-auth-config