PHP code example of ryangjchandler / filament-user-resource

1. Go to this page and download the library: Download ryangjchandler/filament-user-resource 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/ */

    

ryangjchandler / filament-user-resource example snippets


use RyanChandler\FilamentUserResources\Resources\UserResource;

public function boot()
{
    UserResource::enablePasswordUpdates();
}

use RyanChandler\FilamentUserResources\Resources\UserResource;

public function boot()
{
    UserResource::enablePasswordUpdates(function (): bool {
        return auth()->user()->role === Role::Admin;
    });
}
bash
php artisan vendor:publish --tag="filament-user-resource-config"