Askancy
Askancy
FFilament
Created by Askancy on 10/22/2023 in #❓┊help
must be a file of type: image/*.
Honestly, no...
12 replies
FFilament
Created by Askancy on 1/29/2024 in #❓┊help
Modal in form Resource
with:
RichEditor::make('testo')
->required()
->columnSpan('full')
->hintAction(
Action::make('shortcode_instructions')
->modalContent(view('filament.pages.actions.shortcode-instructions'))
),
RichEditor::make('testo')
->required()
->columnSpan('full')
->hintAction(
Action::make('shortcode_instructions')
->modalContent(view('filament.pages.actions.shortcode-instructions'))
),
I get the error: LOG.error: Filament\Forms\Components\Field::hintAction(): Argument #1 ($action) must be of type Filament\Forms\Components\Actions\Action|Closure, Filament\Tables\Actions\Action given
5 replies
FFilament
Created by Askancy on 12/18/2023 in #❓┊help
Filter in the table but with different model
Solved with:
Filter::make('Senza Data')
->query(function ($query) {
$query->whereHas('data_game', function ($query) {
Filter::make('Senza Data')
->query(function ($query) {
$query->whereHas('data_game', function ($query) {
public function data_game(): hasMany
{
return $this>hasMany(InfoGiochi::class, '**', 'id');
}
public function data_game(): hasMany
{
return $this>hasMany(InfoGiochi::class, '**', 'id');
}
4 replies
FFilament
Created by Askancy on 11/20/2023 in #❓┊help
Options for the RichEditor
no idea?
4 replies
FFilament
Created by Askancy on 9/21/2023 in #❓┊help
Multiple Select with BelongsToMany relationship
Yes, you probably created the relationship wrong in filamentphp.
9 replies
FFilament
Created by Askancy on 11/10/2023 in #❓┊help
Function in aftersave() is not executed
It kept not going and I realized the error.... a very stupid mistake that we didn't think....😂😂 afterSave is for EditArticle, for CreateArticle is afterCreate
9 replies
FFilament
Created by Askancy on 11/10/2023 in #❓┊help
Function in aftersave() is not executed
Sorry, I guess I don't understand what you mean by " tap the record to get a new instance."
9 replies
FFilament
Created by Askancy on 11/8/2023 in #❓┊help
Steps of a Wizard in EDIT clickable
And having a quick link leading to that step is possible? Something like: admin/giochi/2250/edit/step#4
7 replies
FFilament
Created by Askancy on 10/28/2023 in #❓┊help
How can I manipulate the response of a post create
I was looking at the demo on github because I'm confused anyway about how to act https://github.com/filamentphp/demo/blob/f2a27fd03ba8a8d2c2b1287d6b3949a456e47be7/app/Filament/Resources/Shop/OrderResource/Pages/CreateOrder.php#L21 could you give me some examples?
8 replies
FFilament
Created by Askancy on 10/28/2023 in #❓┊help
How can I manipulate the response of a post create
Ok so I have to use afterCreate, but how do I get the created item id to resave it? with $data['id']? and for save? $data->save()?
8 replies
FFilament
Created by Askancy on 10/22/2023 in #❓┊help
must be a file of type: image/*.
It was a PNG image, if the mime is wrong, why does it upload instead of failing? Also, why does the error occur only in Create and not in Edit? I honestly did not put any validation...
12 replies
FFilament
Created by Askancy on 10/22/2023 in #❓┊help
must be a file of type: image/*.
any idea?
12 replies
FFilament
Created by samee1 on 10/22/2023 in #❓┊help
Form submit not recognizing data from 'view field'
also shows the form code
4 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
I'm converting an existing project from 2008, which has evolved over the years, so I can't use all the Laravel conventions... I don't think one is obliged to follow these conventions.... it's recommend but not obliged...
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
No description
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
Bump
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
Now in the edit page the select remains empty, but if I search for a Franchise and save, it correctly saves the query in the database:
Select::make('Franchise')
->label('Franchise:')
->relationship('franchises', 'name')
->searchable(),
Select::make('Franchise')
->label('Franchise:')
->relationship('franchises', 'name')
->searchable(),
public function franchises(): belongsToMany
{
return $this->belongsToMany(Franchise::class, 'franchise_pivot', 'gioco_id', 'franchise_id')
->select('franchise.id AS franchise_id');
}
public function franchises(): belongsToMany
{
return $this->belongsToMany(Franchise::class, 'franchise_pivot', 'gioco_id', 'franchise_id')
->select('franchise.id AS franchise_id');
}
However, how come it saves correctly in the table but the select when viewing the edit page remains empty? ->select('franchise.id AS franchise_id') I had to add it because I was getting the error: >SQLSTATE[23000]: Integrity constraint violation: 1052 Column 'id' in where clause is ambiguous
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
No description
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
no I get null
23 replies
FFilament
Created by Askancy on 10/13/2023 in #❓┊help
Create select with pivot relationship
Even with 'name' it keeps returning the id. Also 4 is the id of the game I am editing, it should show me id 7 to be correct...
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'franchise_pivot.name' in 'field list'
SELECT
`franchise_pivot`.`name`,
`franchise_pivot`.`id`
FROM
`franchise_pivot`
WHERE
(`name` LIKE % assasas %)
ORDER BY
`franchise_pivot`.`name` ASC
limit
50
SQLSTATE[42S22]: Column not found: 1054 Unknown column 'franchise_pivot.name' in 'field list'
SELECT
`franchise_pivot`.`name`,
`franchise_pivot`.`id`
FROM
`franchise_pivot`
WHERE
(`name` LIKE % assasas %)
ORDER BY
`franchise_pivot`.`name` ASC
limit
50
the name column should take it from Franchise not Franchise_pivot
23 replies