RizwanNasir
RizwanNasir
FFilament
Created by RizwanNasir on 12/14/2023 in #❓┊help
Can't access current Item in Repeater when delete action is called.
@toeknee thank you: but i end up doing my own way here :
$updatedScreenIds = collect($screens)->map(fn(array $screen) => $screen['id'])->values();
$this->user->introScreens()->whereNotIn('id', $updatedScreenIds)
->with('media')
->delete();
$updatedScreenIds = collect($screens)->map(fn(array $screen) => $screen['id'])->values();
$this->user->introScreens()->whereNotIn('id', $updatedScreenIds)
->with('media')
->delete();
just checking the again for records that are not present in updatedList but in the database then deleting them. until we have any official way of doing it.
4 replies
FFilament
Created by RizwanNasir on 12/13/2023 in #❓┊help
Can't `$this->form->fill()` images in custom Livewire Page while using Repeater
I was missing call to my actual ->model() instance on SpatieMediaLibraryFileUpload componet. e.g
SpatieMediaLibraryFileUpload::make('app_intro_image')
->collection('my-collection')
->hiddenLabel()
->columnSpan(2)
->required()
->model($this->appIntro'),
SpatieMediaLibraryFileUpload::make('app_intro_image')
->collection('my-collection')
->hiddenLabel()
->columnSpan(2)
->required()
->model($this->appIntro'),
8 replies
FFilament
Created by RizwanNasir on 12/13/2023 in #❓┊help
Can't `$this->form->fill()` images in custom Livewire Page while using Repeater
@Lara Zeus after rendered the public array $data does contain auto generated uuid for the keys of repeater childeren.
+data: array:3 [
"app_home_page_order" => array:2 []
"app_general_title" => "Stack App"
"app_screens" => array:1 [
"2f70d635-e64f-4f7c-832b-67cf019dec2e" => array:4 [
"app_intro_id" => "f8dff274-3408-4d7a-a359-0e4cac89b0e4"
"app_intro_title" => "1st new"
"app_intro_description" => "Nice Feature"
"app_intro_image" => []
]
]
]
+data: array:3 [
"app_home_page_order" => array:2 []
"app_general_title" => "Stack App"
"app_screens" => array:1 [
"2f70d635-e64f-4f7c-832b-67cf019dec2e" => array:4 [
"app_intro_id" => "f8dff274-3408-4d7a-a359-0e4cac89b0e4"
"app_intro_title" => "1st new"
"app_intro_description" => "Nice Feature"
"app_intro_image" => []
]
]
]
8 replies
FFilament
Created by RizwanNasir on 12/13/2023 in #❓┊help
Can't `$this->form->fill()` images in custom Livewire Page while using Repeater
becuse this issue still uccoring to this date since in v2 and now in v3. @KA did you ever encounter this issue while using form builder this way ?
8 replies
FFilament
Created by RizwanNasir on 7/13/2023 in #❓┊help
Align Toggle Button
never mind guys
$this->section("Cart Notifications", [
Grid::make(1)->schema([
Toggle::make('recent_product_enabled')
->label('Enabled'),
])->extraAttributes([
'style' => 'float: right; '
]),
TextInput::make('cart_title')
->label('Title')
->required(),
Textarea::make('cart_content')
->label('Content')
->rows(2)
->required(),
])
$this->section("Cart Notifications", [
Grid::make(1)->schema([
Toggle::make('recent_product_enabled')
->label('Enabled'),
])->extraAttributes([
'style' => 'float: right; '
]),
TextInput::make('cart_title')
->label('Title')
->required(),
Textarea::make('cart_content')
->label('Content')
->rows(2)
->required(),
])
2 replies