PHP code example of tomatophp / filament-accounts-auth

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

    

tomatophp / filament-accounts-auth example snippets


use Devdojo\Auth\Models\User as AuthUser;

class Account extends AuthUser implements HasAvatar, HasMedia
{
    // ...
}

use Illuminate\Support\Facades\Gate;

Gate::define('viewAuthSetup', fn ($user = null) => $user?->email === '[email protected]');

// lang/vendor/devdojo-auth/ar/language.php
return [
    'login' => [
        'page_title' => 'تسجيل الدخول',
        'headline' => 'تسجيل الدخول',
    ],
];

use Devdojo\Auth\Traits\HasSocialProviders;

class Account extends Model
{
    use HasSocialProviders;
}
bash
php artisan vendor:publish --tag=auth:assets
php artisan vendor:publish --tag=auth:config
php artisan vendor:publish --tag=auth:migrations
bash
php artisan migrate
bash
php artisan vendor:publish --tag="filament-accounts-model"