BakaPresident
BakaPresident
Explore posts from servers
FFilament
Created by BakaPresident on 4/16/2024 in #❓┊help
How do I filter data by permission
I have a table of Orders. So i have OrderResource but how do i filter the order based on type. For example, my roles wheelchair should only be able to see the Order type wheelchair while admin is able to see everything Thanks in advance :(
14 replies
FFilament
Created by BakaPresident on 10/14/2023 in #❓┊help
Unable to show non numeric primary key in tables?
I have the current schema in
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('busnumber')
->required()
->maxLength(8),
Forms\Components\Select::make('driver_id')
->relationship('driver', 'name')
->required(),
Forms\Components\TextInput::make('model')
->required()
->maxLength(65535)
->columnSpanFull(),
Forms\Components\TextInput::make('maxpax')
->required()
->numeric()
->maxLength(65535)
->columnSpanFull(),
]);
}
public static function form(Form $form): Form
{
return $form
->schema([
Forms\Components\TextInput::make('busnumber')
->required()
->maxLength(8),
Forms\Components\Select::make('driver_id')
->relationship('driver', 'name')
->required(),
Forms\Components\TextInput::make('model')
->required()
->maxLength(65535)
->columnSpanFull(),
Forms\Components\TextInput::make('maxpax')
->required()
->numeric()
->maxLength(65535)
->columnSpanFull(),
]);
}
However, the busnumber seems to print out to 0 on the form. The rest is printing out fine. Could this be because busnumber is a primary key?
10 replies