gigiloouu
gigiloouu
FFilament
Created by gigiloouu on 9/18/2024 in #❓┊help
add widget inside the table view
No description
28 replies
FFilament
Created by gigiloouu on 9/12/2024 in #❓┊help
change navigation width
No description
8 replies
FFilament
Created by gigiloouu on 3/22/2024 in #❓┊help
migration error
i create new migration to add cascadeondelete() but when i try to run migrations i have this error SQLSTATE[42000]: Syntax error or access violation: 1091 Can't DROP 'purchases_company_id_foreign'; check that column/key exists (Connection: mysql, SQL: alter table purchases drop foreign key purchases_company_id_foreign)
35 replies
FFilament
Created by gigiloouu on 3/21/2024 in #❓┊help
Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint
No description
9 replies
FFilament
Created by gigiloouu on 3/21/2024 in #❓┊help
write name using id
in there i have company_id and i want using that write company_name how ican do it ?
TextColumn::make('purchase.company_id')
->searchable()
->sortable(),
TextColumn::make('purchase.company_id')
->searchable()
->sortable(),
10 replies
FFilament
Created by gigiloouu on 3/18/2024 in #❓┊help
add another table form in the another form
in another table i have
Tables\Actions\Action::make('editOtherModel')
->label('See'),
Tables\Actions\Action::make('editOtherModel')
->label('See'),
and i want when i click this action open new popup or window and show this table items table like normal table with add or edit
3 replies
FFilament
Created by gigiloouu on 3/14/2024 in #❓┊help
admin 403forbidden error
when i login i have 403 forbbiden erorr in /admin route why? in production
28 replies
FFilament
Created by gigiloouu on 3/13/2024 in #❓┊help
The POST method is not supported for route admin/login. Supported methods: GET, HEAD.
No description
154 replies
FFilament
Created by gigiloouu on 3/12/2024 in #❓┊help
The POST method is not supported for route admin/login. Supported methods: GET, HEAD.
No description
5 replies
FFilament
Created by gigiloouu on 3/6/2024 in #❓┊help
Select field [mountedActionsData.0.brand_id] must have a [createOptionUsing()] closure set.
No description
4 replies
FFilament
Created by gigiloouu on 3/4/2024 in #❓┊help
error it cant see my table columns
No description
117 replies
FFilament
Created by gigiloouu on 3/1/2024 in #❓┊help
make repeater validation
I have Repeater where i can add many blogs. this blogs has amount. this blogs amount sum should not be more then sum amount . I want to make validation if first brand amount is 500 and second brand amount i wrote 300 and sum amount === 600 second brand amount should have erorr that max value is 100. there is my code:
php
Repeater::make('purchaseBrands')
->relationship()
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('../../supplier_id') === null) {
return $query;
}
$brandIds = Supplier::find($get('../../supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})
->searchable()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->required()
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
TextInput::make('brand_amount')
->numeric()
->required()
]),
TextInput::make('amount')->required()
->required()
->numeric()
->live()
->maxValue()

])
->columns(2)
->addActionLabel('add blog')
->collapsible(),
php
Repeater::make('purchaseBrands')
->relationship()
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('../../supplier_id') === null) {
return $query;
}
$brandIds = Supplier::find($get('../../supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})
->searchable()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->required()
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
TextInput::make('brand_amount')
->numeric()
->required()
]),
TextInput::make('amount')->required()
->required()
->numeric()
->live()
->maxValue()

])
->columns(2)
->addActionLabel('add blog')
->collapsible(),
55 replies
FFilament
Created by gigiloouu on 2/29/2024 in #❓┊help
error with relationship
why i have this error. ( i really have no idea dd ) https://flareapp.io/share/x5MWyJwP code:
Repeater::make('purchaseBrands')
->relationship()
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('../../supplier_id') === null) {
return;
}
$brandIds = Supplier::find($get('../../supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})
->searchable()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->required()
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
TextInput::make('brand_amount')
->numeric()
->required()
]),
TextInput::make('amount')->required()
->required(),
])
Repeater::make('purchaseBrands')
->relationship()
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('../../supplier_id') === null) {
return;
}
$brandIds = Supplier::find($get('../../supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})
->searchable()
->disableOptionsWhenSelectedInSiblingRepeaterItems()
->required()
->preload()
->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),
TextInput::make('brand_amount')
->numeric()
->required()
]),
TextInput::make('amount')->required()
->required(),
])
problem is with relationship
34 replies
FFilament
Created by gigiloouu on 2/29/2024 in #❓┊help
how i can make input full with
No description
2 replies
FFilament
Created by gigiloouu on 2/28/2024 in #❓┊help
save repeater data in pivot table
I have purchases table where will be many brands with amount and im using repeater for form. so for that i decide to make pivot table to save brand id and brand amount in another pivote table. i cant find same example or solution.. how its be good to do?
12 replies
FFilament
Created by gigiloouu on 2/28/2024 in #❓┊help
dont show choosen item in repeater
Hi, i have repeater where i have select input. i want when i select and add new form dont show choosen item in next select.
24 replies
FFilament
Created by gigiloouu on 2/28/2024 in #❓┊help
problem with Repeater
I have problem with repeater. when im using just selection, filter works fine but when i use this same selection inside the repeater its not filter right. there is both code
Repeater::make('Brands')
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('supplier_id') === null) {
return;
}

$brandIds = Supplier::find($get('supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})

->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),

]),
TextInput::make('amount')->required()
->required(),
])
->columns(2)
->collapsible(),
Repeater::make('Brands')
->schema([
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('supplier_id') === null) {
return;
}

$brandIds = Supplier::find($get('supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})

->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),

]),
TextInput::make('amount')->required()
->required(),
])
->columns(2)
->collapsible(),
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('supplier_id') === null) {
return;
}

$brandIds = Supplier::find($get('supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})

->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),

]),
Select::make('brand_id')
->label('Brand')
->relationship('brand', 'name', function (Builder $query, Get $get) {
if($get('supplier_id') === null) {
return;
}

$brandIds = Supplier::find($get('supplier_id'))->brand_id;
$query->whereIn('id', $brandIds);
})

->createOptionForm([
TextInput::make('name')
->required()
->label('New Brand'),

]),
35 replies
FFilament
Created by gigiloouu on 2/27/2024 in #❓┊help
get choosen item id
i have this code
$total_amount = Pay::where('purchase_id', $purchase_id)
->where('item_id', '!=', $excluded_item_id) // Exclude the specific item
->sum('amount');
$total_amount = Pay::where('purchase_id', $purchase_id)
->where('item_id', '!=', $excluded_item_id) // Exclude the specific item
->sum('amount');
i want get choosen item id to pass for exlcuded_item_id
5 replies
FFilament
Created by gigiloouu on 2/26/2024 in #❓┊help
textInput live error
i have textinput which has live(). this input is numberic also in db it is int but when i add some number and next remove it has error
Unsupported operand types: string / float
Unsupported operand types: string / float
becouse of its empty string when i remove (i think) how i can fix it?
34 replies
FFilament
Created by gigiloouu on 2/26/2024 in #❓┊help
update 2 inputs in live
i have 2 inputs amount and amout_persent. i want when i write amount automaticly fill the amount persent input with some logic.. just how i can make to autimaticly write something to next input?
48 replies