Oliwer
Oliwer
FFilament
Created by Oliwer on 2/12/2025 in #❓┊help
Company plugin implementation problem. Can't create first new Company object.
Hey, could someone help with company plugin implementation? I quite don't understand how to implement CompanyResources to Filament. Documentation of this module don't help with creation a company. Someone implemented this, and can share his configs or explain how to create new company.. https://filamentphp.com/plugins/andrew-wallo-companies
class CompanyResource extends Resource
{
protected static ?string $model = Company::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')->required(),
TextInput::make('user_id')->required(),
Select::make('personal_company')->multiple()->relationship('users','name'),
]);
}
class CompanyResource extends Resource
{
protected static ?string $model = Company::class;

protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack';

public static function form(Form $form): Form
{
return $form
->schema([
TextInput::make('name')->required(),
TextInput::make('user_id')->required(),
Select::make('personal_company')->multiple()->relationship('users','name'),
]);
}
1 replies