1. Go to this page and download the library: Download mortezamasumi/fb-user 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/ */
mortezamasumi / fb-user example snippets
use Mortezamasumi\FbUser\FbUserPlugin;
public function panel(Panel $panel): Panel
{
return $panel
->plugins([
FbUserPlugin::make(),
]);
}
use Mortezamasumi\FbUser\Models\User as BaseUser;
class User extends BaseUser
{
// your application-specific user logic
}
use Mortezamasumi\FbUser\Traits\HasCascadeOperation;
class Student extends Model
{
use HasCascadeOperation;
}
$user->cascadeUpdate(['student' => 'student']); // delete/restore relations by role
$user->cascadeDelete(['student']); // delete relations (with or without role)
$user->cascadeRestore(['student' => 'student']); // restore relations and re-assign role