### Installing Development Version of Filament Companies Package (JSON) Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This JSON snippet illustrates how to configure your application's composer.json file to install a specific development branch of the andrewdwallo/filament-companies package. This setup is crucial for local development, testing new features, or applying fixes directly from a forked repository. ```json { ... "require": { "andrewdwallo/filament-companies": "dev-fix/error-message" }, "repositories": [ { "type": "path", "url": "filament-companies/" } ], ... } ``` -------------------------------- ### Install Filament Panel Builder Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This command installs the core Filament Panel Builder into your Laravel application. It's a prerequisite for using Filament-based packages. Ensure your Laravel project is set up before running. ```shell php artisan filament:install --panels ``` -------------------------------- ### Migrate Socialite Providers from Class to Enum in PHP Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/UPGRADE.md Demonstrates the migration of Socialite provider configuration from the deprecated 'Wallo\FilamentCompanies\Providers' class to the new 'Wallo\FilamentCompanies\Enums\Provider' enum. This includes examples for enabling providers and checking their enabled status. ```php use Wallo\FilamentCompanies\Providers; // Enable the following Socialite providers. Providers::github(), // And so on for the other providers... // Determine if the following Socialite providers are enabled. Providers::hasGithub(), // And so on for the other providers... ``` ```php use Wallo\FilamentCompanies\Enums\Provider; // Enable the following Socialite providers. Provider::Github, // And so on for the other providers... // Determine if the following Socialite providers are enabled. Provider::Github->isEnabled(), // And so on for the other providers... ``` -------------------------------- ### Update FilamentCompanies Dependency with Composer Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/UPGRADE.md Instructions to update the 'andrewdwallo/filament-companies' dependency to version '^4.0' within your application's 'composer.json' file, followed by running the 'composer update' command to apply changes. ```shell composer update ``` -------------------------------- ### Install Filament Companies Composer Package Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This Composer command adds the andrewdwallo/filament-companies package to your Laravel project. It downloads the necessary files and dependencies. Run this after setting up your Laravel environment. ```shell composer require andrewdwallo/filament-companies ``` -------------------------------- ### Scaffold Filament Companies Application Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This Artisan command scaffolds the filament-companies package, setting up necessary files and configurations. It will prompt you to choose between a base installation or enabling Socialite support. Run this after installing the package. ```shell php artisan filament-companies:install ``` -------------------------------- ### Configure Custom Filament Theme in Vite and Panel Provider Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md These instructions, displayed after creating a custom theme, guide you on how to integrate the new theme. They involve updating vite.config.js to include the theme's CSS, registering it in the company panel provider, and finally building the assets with npm run build. ```shell ⇂ First, add a new item to the `input` array of `vite.config.js`: `resources/css/filament/company/theme.css` ⇂ Next, register the theme in the company panel provider using `->viteTheme('resources/css/filament/company/theme.css`)` ⇂ Finally, run `npm run build` to compile the theme ``` -------------------------------- ### Migrate Socialite Features from Class to Enum in PHP Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/UPGRADE.md Illustrates the process of migrating Socialite feature configuration from the deprecated 'Wallo\FilamentCompanies\Socialite' class to the new 'Wallo\FilamentCompanies\Enums\Feature' enum. Examples show how to enable features and check their status. ```php use Wallo\FilamentCompanies\Socialite; // Enable the following features. Socialite::rememberSession(), // And so on for the other features... // Determine if the following features are enabled. Socialite::hasRememberSessionFeature(), // And so on for the other features... ``` ```php use Wallo\FilamentCompanies\Enums\Feature; // Enable the following features. Feature::RememberSession, // And so on for the other features... // Determine if the following features are enabled. Feature::RememberSession->isEnabled(), // And so on for the other features... ``` -------------------------------- ### Run Database Migrations for Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This Artisan command executes database migrations, creating or updating the necessary tables for the filament-companies package. The --fresh flag will drop all existing tables before re-running migrations, useful for development. Use with caution in production. ```shell php artisan migrate:fresh ``` -------------------------------- ### Configure Auto-Accept Company Invitations in FilamentCompanies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md Enables the auto-acceptance of company invitations, redirecting invited users directly to their company upon registration. This feature is configured within the `FilamentCompaniesServiceProvider` to streamline the onboarding process. ```php FilamentCompanies::make() ->companies(invitations: true) ->autoAcceptInvitations() ``` -------------------------------- ### Configure Gmail SMTP for Mail in .env Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md Sets up environment variables for sending emails via Gmail's SMTP server. This configuration requires a Gmail app password for authentication and is typically placed in the application's `.env` file. ```dotenv MAIL_MAILER=smtp MAIL_HOST=smtp.gmail.com MAIL_PORT=587 MAIL_USERNAME= MAIL_PASSWORD= MAIL_ENCRYPTION=tls MAIL_FROM_ADDRESS= MAIL_FROM_NAME="${APP_NAME}" ``` -------------------------------- ### Publish Filament Companies View Files Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This shell command is used to publish the customizable view files of the Filament Companies package. Publishing views allows developers to modify the package's UI to match their application's design. ```shell php artisan vendor:publish --tag=filament-companies-views ``` -------------------------------- ### Enable Company Switching in FilamentCompanies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP configuration snippet demonstrates how to enable the company switching feature within the FilamentCompanies package. By calling `switchCurrentCompany()` on the `FilamentCompanies` plugin instance, users gain the ability to switch between different companies in the application. ```PHP use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->switchCurrentCompany() ); } } ``` -------------------------------- ### Configure Socialite Providers and Features in FilamentCompanies Panel Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP code demonstrates how to configure multiple Socialite providers and enable various features (e.g., RememberSession, ProviderAvatars, GenerateMissingEmails) within the FilamentCompanies plugin for a Filament panel. It specifies a comprehensive list of supported providers. ```PHP use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; use Wallo\FilamentCompanies\Enums\Feature; use Wallo\FilamentCompanies\Enums\Provider; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->socialite( providers: [ Provider::Github, Provider::Gitlab, Provider::Google, Provider::Facebook, Provider::Linkedin, Provider::LinkedinOpenId, Provider::Bitbucket, Provider::Slack, Provider::Twitter, Provider::TwitterOAuth2, ], features: [ Feature::RememberSession, Feature::ProviderAvatars, Feature::GenerateMissingEmails, Feature::LoginOnRegistration, Feature::CreateAccountOnFirstLogin, ] ) ); } } ``` -------------------------------- ### Publish Filament Companies Language Files Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This shell command allows developers to publish the language files associated with the Filament Companies package. Publishing these files enables customization and translation of the package's text strings. ```shell php artisan vendor:publish --tag=filament-companies-translations ``` -------------------------------- ### Register User Profile and Access Token Pages in Filament Panel Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to register the Profile and PersonalAccessTokens pages within a Filament panel configuration. These pages are essential for user management and access token handling in the Filament Companies package. ```php use Wallo\FilamentCompanies\Pages\User\PersonalAccessTokens; use Wallo\FilamentCompanies\Pages\User\Profile; public function panel(Panel $panel): Panel { return $panel // ... ->pages([ Profile::class, PersonalAccessTokens::class, ]) } ``` -------------------------------- ### Define Socialite Provider Credentials in Laravel Services Configuration Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP configuration snippet illustrates how to define credentials for a Socialite provider (e.g., GitHub) in the `config/services.php` file. It includes placeholders for the client ID, client secret, and the crucial redirect URI for OAuth callbacks. ```PHP /* |-------------------------------------------------------------------------- | Third Party Services |-------------------------------------------------------------------------- | | This file is for storing the credentials for third party services such | as Mailgun, Postmark, AWS and more. This file provides the de facto | location for this type of information, allowing packages to have | a conventional file to locate the various service credentials. | */ 'github' => [ 'client_id' => env('GITHUB_CLIENT_ID'), 'client_secret' => env('GITHUB_CLIENT_SECRET'), 'redirect' => 'https://filament.test/company/oauth/github/callback', ], ``` -------------------------------- ### Add Custom Profile Components in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to register custom Livewire components with Filament Companies. It uses the addProfileComponents() method, passing an associative array where keys are sort orders and values are component class names. ```php use App\Livewire\CustomComponent; FilamentCompanies::make() ->addProfileComponents([ 7 => CustomComponent::class, ]); ``` -------------------------------- ### Configure User Menu and Navigation Items in Filament Panel Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet illustrates how to add custom menu items to the user dropdown and navigation items to the sidebar within a Filament panel. It includes links to the user's profile, company dashboard, and personal access tokens page, enhancing user navigation. ```php use Filament\Navigation\MenuItem; use Filament\Navigation\NavigationItem; use Illuminate\Support\Facades\Auth; use Wallo\FilamentCompanies\Pages\User\PersonalAccessTokens; use Wallo\FilamentCompanies\Pages\User\Profile; public function panel(Panel $panel): Panel { return $panel // ... ->userMenuItems([ 'profile' => MenuItem::make() ->label('Profile') ->icon('heroicon-o-user-circle') ->url(static fn () => Profile::getUrl()), MenuItem::make() ->label('Company') ->icon('heroicon-o-building-office') ->url(static fn () => Pages\Dashboard::getUrl(panel: FilamentCompanies::getCompanyPanel(), tenant: Auth::user()->personalCompany())), ]) ->navigationItems([ NavigationItem::make('Personal Access Tokens') ->label(static fn (): string => __('filament-companies::default.navigation.links.tokens')) ->icon('heroicon-o-key') ->url(static fn () => PersonalAccessTokens::getUrl()), ]) } ``` -------------------------------- ### Customize FilamentCompanies Profile Components Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to replace a default FilamentCompanies component with a custom Livewire component. By passing the custom component's class name to the `component` parameter of the relevant method, developers can personalize the application's UI and functionality. ```PHP use App\Livewire\CustomComponent; FilamentCompanies::make() ->updateProfileInformation(component: CustomComponent::class); ``` -------------------------------- ### Configure Profile Features in FilamentCompanies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP configuration snippet illustrates how to selectively enable or disable various user profile features provided by the FilamentCompanies package. Each method call, such as `updateProfileInformation()` or `accountDeletion()`, enables a specific feature, allowing for fine-grained control over user account management. ```PHP use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->updateProfileInformation() // Enables updating profile information ->updatePasswords() // Enables password updates ->setPasswords() // Enables setting passwords only if Socialite is enabled ->connectedAccounts() // Enables connected account management only if Socialite is enabled ->manageBrowserSessions() // Enables browser session management ->accountDeletion() // Enables account deletion ); } } ``` -------------------------------- ### Handle Company Menu Item URL for Auto-Accept Invitations Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet provides a robust way to generate the 'Company' menu item URL, especially when 'Auto-Accept Invitations' is enabled. It checks if the user has a primary company and redirects to the company dashboard or the tenant registration URL if no company is found, preventing errors. ```php MenuItem::make() ->label('Company') ->icon('heroicon-o-building-office') ->url(static function (): ?string { $user = Auth::user(); if ($company = $user?->primaryCompany()) { return Pages\Dashboard::getUrl(panel: FilamentCompanies::getCompanyPanel(), tenant: $company); } return Filament::getPanel(FilamentCompanies::getCompanyPanel())->getTenantRegistrationUrl(); }), ``` -------------------------------- ### Create Custom Filament Theme for Company Panel Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This Artisan command generates a new custom theme for a specific Filament panel, in this case, the 'company' panel. It helps ensure Tailwind CSS processes the package's styles correctly. Follow the console instructions after running this command. ```shell php artisan make:filament-theme company ``` -------------------------------- ### Configure Roles and Permissions in FilamentCompanies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md Defines API token permissions and custom roles (e.g., 'admin', 'editor') with their associated abilities (create, read, update, delete). This configuration is managed within the `configurePermissions` method of the `FilamentCompaniesServiceProvider`. ```php /** * Configure the roles and permissions that are available within the application. */ protected function configurePermissions(): void { FilamentCompanies::defaultApiTokenPermissions(['read']); FilamentCompanies::role('admin', 'Administrator', [ 'create', 'read', 'update', 'delete' ])->description('Administrator users can perform any action.'); FilamentCompanies::role('editor', 'Editor', [ 'read', 'create', 'update' ])->description('Editor users have the ability to read, create, and update.'); } ``` -------------------------------- ### Set GitHub OAuth Homepage URL for Filament Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This snippet provides the recommended homepage URL to use when registering a new GitHub OAuth application for integration with Filament. ```plaintext http://filament.test/company ``` -------------------------------- ### Configure Tailwind CSS Content Paths for Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This JavaScript configuration snippet for tailwind.config.js ensures that Tailwind CSS scans the package's vendor views for classes. It's crucial for proper styling of the filament-companies components. Add the specified path to your content array. ```javascript export default { content: [ './resources/**/*.blade.php', './vendor/filament/**/*.blade.php', './vendor/andrewdwallo/filament-companies/resources/views/**/*.blade.php', // The package's vendor directory ], // ... } ``` -------------------------------- ### Configure Profile Photo Disk Storage in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet shows how to specify a different storage disk for profile photos. By default, the package uses Laravel's public disk, but you can override it by passing the disk parameter to the profilePhotos() method. ```php FilamentCompanies::make() ->profilePhotos(disk: 's3') ``` -------------------------------- ### Create Custom Component View with Filament Grid Section Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This Blade template shows how to structure a custom component's view to match the Filament UI. It utilizes the x-filament-companies::grid-section component for layout and includes slots for title, description, and a Filament form with a submit button. ```blade {{ __('My Custom Component') }} {{ __('This is my custom component.') }} {{ $this->form }}
{{ __('Save') }}
``` -------------------------------- ### Store GitHub Client Credentials in .env File Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This dotenv snippet illustrates how to add the GitHub client ID and client secret to your project's `.env` file. These environment variables are essential for Laravel to securely access the GitHub OAuth service. ```dotenv GITHUB_CLIENT_ID= GITHUB_CLIENT_SECRET= ``` -------------------------------- ### Sort FilamentCompanies Profile Features Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP configuration snippet shows how to customize the display order of profile features within FilamentCompanies. By setting the `sort` parameter for each feature method, developers can define a specific sequence for how these components appear in the user interface. ```PHP FilamentCompanies::make() ->updateProfileInformation(sort: 0) ->updatePasswords(sort: 1) ->setPasswords(sort: 2) ->connectedAccounts(sort: 3) ->manageBrowserSessions(sort: 4) ->accountDeletion(sort: 5); ``` -------------------------------- ### Set GitHub OAuth Application Name for Filament Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This snippet provides the recommended application name to use when registering a new GitHub OAuth application for integration with Filament. ```plaintext Filament ``` -------------------------------- ### Accessing User Company Relationships with HasCompanies Trait (PHP) Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP code snippet demonstrates various methods available through the Wallo\FilamentCompanies\HasCompanies trait, which is applied to the App\Models\User model. It shows how to access a user's current, all, owned, or personal companies, check company membership and ownership, and retrieve user roles and permissions within a specific company context. ```php // Access a user's currently selected company... $user->currentCompany : Wallo\FilamentCompanies\Company // Access all of the companies (including owned companies) that a user belongs to... $user->allCompanies() : Illuminate\Support\Collection // Access all of a user's owned companies... $user->ownedCompanies : Illuminate\Database\Eloquent\Collection // Access all of the companies that a user belongs to but does not own... $user->companies : Illuminate\Database\Eloquent\Collection // Access a user's "personal" company... $user->personalCompany() : Wallo\FilamentCompanies\Company // Get the user's primary company (prioritizes personal company)... $user->primaryCompany() : Wallo\FilamentCompanies\Company|null // Determine if the user has any companies... $user->hasAnyCompanies() : bool // Determine if a user owns a given company... $user->ownsCompany($company) : bool // Determine if a user belongs to a given company... $user->belongsToCompany($company) : bool // Get the role that the user is assigned on the company... $user->companyRole($company) : \Wallo\FilamentCompanies\Role // Determine if the user has the given role on the given company... $user->hasCompanyRole($company, 'admin') : bool // Access an array of all permissions a user has for a given company... $user->companyPermissions($company) : array // Determine if a user has a given company permission... $user->hasCompanyPermission($company, 'server:create') : bool ``` -------------------------------- ### Enable Profile Photo Uploads in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to enable user profile photo uploads within the Filament Companies package. It involves calling the profilePhotos() method on the FilamentCompanies plugin instance within your FilamentCompaniesServiceProvider's panel method. ```php use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->profilePhotos() ) } } ``` -------------------------------- ### Set GitHub OAuth Authorization Callback URL for Filament Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This snippet provides the recommended authorization callback URL to use when registering a new GitHub OAuth application for integration with Filament. This URL is critical for the OAuth flow to redirect users after authentication. ```plaintext http://filament.test/company/oauth/github/callback ``` -------------------------------- ### Register Email Verification URL Callback in Filament Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to register a custom URL callback for email verification notifications within Filament. It uses `Filament::getVerifyEmailUrl()` to generate the verification link, ensuring users are directed to the correct verification page after registration. ```PHP use Filament\Facades\Filament; use Filament\Notifications\Auth\VerifyEmail; // Verify email notification url VerifyEmail::createUrlUsing(function ($notifiable) { return Filament::getVerifyEmailUrl($notifiable); }); ``` -------------------------------- ### Configure User Panel ID for Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to explicitly set the ID for the user panel within the Filament Companies plugin configuration. This allows developers to specify which Filament panel should be recognized as the user panel for the package's functionalities. ```php use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->userPanel('user') ) } } ``` -------------------------------- ### Reference Delete Company Action Class Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md References the fully qualified class name for the DeleteCompany action and documents its `companyDeleted` method, which is called after a company is deleted. ```php \App\Actions\FilamentCompanies\DeleteCompany::class /** @method void companyDeleted(\Illuminate\Database\Eloquent\Model|null $company = null) */ ``` -------------------------------- ### Set Custom Storage Path for Profile Photos in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet illustrates how to define a custom directory for storing profile photos. The storagePath parameter can be used with the profilePhotos() method to organize uploaded images into a specific folder. ```php FilamentCompanies::make() ->profilePhotos(storagePath: 'profile-avatars') ``` -------------------------------- ### Adjust Modal Layout and Behavior in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet demonstrates how to customize the appearance and behavior of modals within Filament Companies. It uses the modals() method to set properties like width, alignment, form actions alignment, and whether the cancel button action is enabled. ```php use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->modals( width: '2xl', alignment: 'center', formActionsAlignment: 'center', cancelButtonAction: false ) ); } } ``` -------------------------------- ### Define Custom Email Verification Route in Laravel Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet shows how to define a custom route for email verification in your Laravel `web.php` file. It uses `Filament\Http\Controllers\Auth\EmailVerificationController` to handle the verification logic, secured with the `signed` middleware to prevent tampering. ```PHP use Filament\Http\Controllers\Auth\EmailVerificationController; Route::get('/email/verify/{id}/{hash}', [EmailVerificationController::class, '__invoke']) ->middleware(['signed']) ->name('verification.verify'); ``` -------------------------------- ### Filament Companies Notification Override Methods API Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This section outlines the methods available for overriding default notifications sent by the Filament Companies package. Each entry provides the class path and the method signature, including optional parameters, for customizing notification behavior. ```APIDOC \App\Actions\FilamentCompanies\UpdateUserProfileInformation::class /** @method void profileInformationUpdated(\Illuminate\Foundation\Auth\User|null $user = null, array|null $input = null) */ ``` ```APIDOC \App\Actions\FilamentCompanies\UpdateUserPassword::class /** @method void passwordUpdated(\Illuminate\Foundation\Auth\User|null $user = null, array|null $input = null) */ ``` ```APIDOC \App\Actions\FilamentCompanies\SetUserPassword::class /** @method void passwordSet(\Illuminate\Foundation\Auth\User|null $user, array|null $input = null) */ ``` ```APIDOC \App\Actions\FilamentCompanies\UpdateCompanyName::class /** @method void companyNameUpdated(\Illuminate\Foundation\Auth\User|null $user = null, \Illuminate\Database\Eloquent\Model|null $company = null, array|null $input = null) */ ``` ```APIDOC \App\Actions\FilamentCompanies\InviteCompanyEmployee::class /** @method void employeeInvitationSent(\Illuminate\Foundation\Auth\User|null $user = null, \Illuminate\Database\Eloquent\Model|null $company = null, string|null $email = null, string|null $role = null) */ ``` -------------------------------- ### Override User Password Update Notification in FilamentCompanies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md Demonstrates how to override the default notification sent when a user updates their password. This involves implementing the `UpdatesUserPasswords` contract and defining a `passwordUpdated` method that sends a custom Filament notification. ```php $input */ public function update(User $user, array $input): void { // ... } public function passwordUpdated(): void { Notification::make() ->title('Password Updated') ->body('Your password has been updated.') ->success(); ->send(); } } ``` -------------------------------- ### Disable Notifications in Filament Companies Source: https://github.com/andrewdwallo/filament-companies/blob/4.x/README.md This PHP snippet shows how to disable all notifications sent by the Filament Companies package. By default, notifications are enabled, but they can be turned off by passing false to the notifications() method within the FilamentCompaniesServiceProvider. ```php use Filament\Panel; use Wallo\FilamentCompanies\FilamentCompanies; class FilamentCompaniesServiceProvider extends PanelProvider { public function panel(Panel $panel): Panel { return $panel // ... ->plugin( FilamentCompanies::make() ->notifications(condition: false) ); } } ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.