PHP code example of tomatophp / filament-accounts
1. Go to this page and download the library: Download tomatophp/filament-accounts 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 example snippets
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make())
return [
/*
* Features of Tomato CRM
*
* accounts: Enable/Disable Accounts Feature
*/
"features" => [
"notifications" => false,
"loginBy" => false,
"avatar" => false,
"types" => false,
"teams" => false,
"impersonate" => [
'active'=> false,
'redirect' => '/app',
],
],
/*
* Accounts Configurations
*
* login_by: Login By Phone or Email
*/
"login_by" => "email",
/*
* Accounts Configurations
*
* model: User Model Class
*/
"model" => \TomatoPHP\FilamentAccounts\Models\Account::class,
];
->plugin(
\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
->useAvatar()
)
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
->useTypes()
)
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
->showAddressField()
)
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
->showTypeField()
)
use TomatoPHP\FilamentAccounts\Facades\FilamentAccounts;
public function boot()
{
FilamentAccounts::register([
AccountOrdersRelationManager::make()
]);
}
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
...
->useExport()
->useImport()
)
public static function table(Table $table): Table
{
return $table
->columns([
AccountColumn::make('account.id'),
]);
}
->plugin(\TomatoPHP\FilamentAccounts\FilamentAccountsPlugin::make()
...
->useImpersonate()
->impersonateRedirect('/app')
)
bash
php artisan filament-accounts:install
bash
php artisan vendor:publish --tag="filament-accounts-model"
php artisan vendor:publish --tag="filament-accounts-config"
bash
php artisan config:cache
bash
composer analyse