Tazeen
TimePicker field not allow to set 24 hrs format.
How did you get the 12 hrs. format by default? I am getting 24 hrs. format and am trying to set 12 hrs. format but it does not seem to work.
I am using the below code... Any help would be much appreciated.
TimePicker::make('endTime')
->label('End Time')
->withoutSeconds()
->required()
->format('h:i A')
10 replies
Unable to Fetch Products Based on Selected Seller in Filament Form in Repeater
Select::make('seller_id')
->options(fn() => User::where('role_id', 3)->pluck('first_name', 'id'))
->required()
->label('Seller')
->searchable()
->preload()
->native(false)
->afterStateUpdated(function ($state, Set $set) {
$set('selected_seller_id', $state);
}),
Hidden::make('selected_seller_id'),
Repeater::make('products')
->schema([
Select::make('product_id')
->options(function (Get $get) {
$sellerId = $get('selected_seller_id');
if ($sellerId) {
$productIds = ProductUser::where('user_id', $sellerId)->pluck('product_id');
return Product::whereIn('id', $productIds)->pluck('name', 'id');
}
return [];
})
->label('Product')
->preload()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->searchable(true)
->reactive()
->afterStateUpdated(function ($state, $set, $get) {
$productId = $state;
if ($productId) {
$productUser = ProductUser::where('user_id', $get('selected_seller_id'))
->where('product_id', $productId)
->first();
if ($productUser) {
$set('quantity_helper', "Minimum quantity is {$productUser->minimum_quantity}");
} else {
$set('quantity_helper', "Select a valid product");
}
}
}),
]);
This is the code that I am using
4 replies
Edit profile page redirection to the Breeze login page to be prevented
I have uninstalled breeze from composer. So now it is redirecting to an error page rather than breeze login. I am not able to find the route where this breeze login is registered
5 replies