ModestasV
ModestasV
FFilament
Created by Bloom on 6/28/2024 in #❓┊help
Global Search like style in form
4 replies
FFilament
Created by Bloom on 6/28/2024 in #❓┊help
Global Search like style in form
Won't ->searchable() do what you need?
4 replies
FFilament
Created by tinkypinky on 3/18/2024 in #❓┊help
Will Filament work with Laravel Reverb or does it need some config?
Sorry for late reply - Krekas has given my written resource, so that should definitely help you!
9 replies
FFilament
Created by Prodex on 5/10/2024 in #❓┊help
How can I avoid N+1 problem in custom views?
On the table, you can modify the query and add eager loading as needed
5 replies
FFilament
Created by Prodex on 5/10/2024 in #❓┊help
How can I avoid N+1 problem in custom views?
Hi, this should help you:
return $table
->modifyQueryUsing(function ($query) {
return $query->with('relationship');
})
return $table
->modifyQueryUsing(function ($query) {
return $query->with('relationship');
})
5 replies
FFilament
Created by ModestasV on 4/29/2024 in #❓┊help
Testing Filament Relation Manager
Okay, variant no.2 is getting closer:
livewire(FieldsRelationManager::class, [
'ownerRecord' => $crud,
'pageClass' => EditCrud::class,
])
->callTableAction(
'create',
$crud,
[
'type' => CrudFieldTypes::TEXT,
'validation' => CrudFieldValidation::REQUIRED,
'label' => 'Test Field',
'tooltip' => 'Test Tooltip',
'in_create' => true,
'in_edit' => true,
'in_list' => true,
]
)
->assertHasNoErrors()
->assertSuccessful();
livewire(FieldsRelationManager::class, [
'ownerRecord' => $crud,
'pageClass' => EditCrud::class,
])
->callTableAction(
'create',
$crud,
[
'type' => CrudFieldTypes::TEXT,
'validation' => CrudFieldValidation::REQUIRED,
'label' => 'Test Field',
'tooltip' => 'Test Tooltip',
'in_create' => true,
'in_edit' => true,
'in_list' => true,
]
)
->assertHasNoErrors()
->assertSuccessful();
This does call what I need, but it still does not submit 🙂 I'm probably doing something wrong
4 replies
FFilament
Created by Damien on 4/24/2024 in #❓┊help
How do I make a table column searchable based on its state value?
It doesn't really matter if it's current or related table 🙂 What matters is the SQL query you will write. In your case, you have to specifically define the table/relationship you are searching in
12 replies
FFilament
Created by Barbaracrlp on 4/25/2024 in #❓┊help
Sessions Table Name
One of the two places 🙂 Yes
9 replies
FFilament
Created by Barbaracrlp on 4/25/2024 in #❓┊help
Sessions Table Name
that would work, but you would have to add it every time
9 replies
FFilament
Created by Barbaracrlp on 4/25/2024 in #❓┊help
Sessions Table Name
You can change the table name in migration and for it to take effect - change the SESSION_TABLE in your .env file OR change table in config/session.php file
9 replies
FFilament
Created by MikeG on 4/22/2024 in #❓┊help
Laravel Echo failing on broadcast auth
Why you don't use Filament echo provider?
9 replies
FFilament
Created by Damien on 4/24/2024 in #❓┊help
How do I make a table column searchable based on its state value?
This might help you: https://filamentphp.com/docs/3.x/tables/columns/getting-started#searching Especially this part:
->searchable(query: function (Builder $query, string $search): Builder {
return $query
->where('first_name', 'like', "%{$search}%")
->orWhere('last_name', 'like', "%{$search}%");
})
->searchable(query: function (Builder $query, string $search): Builder {
return $query
->where('first_name', 'like', "%{$search}%")
->orWhere('last_name', 'like', "%{$search}%");
})
12 replies
FFilament
Created by Kaaiman on 4/23/2024 in #❓┊help
Conditionally show Relationship (manager)
Add this on your relation manager (child, not parent)
5 replies
FFilament
Created by Kaaiman on 4/23/2024 in #❓┊help
Conditionally show Relationship (manager)
public static function canViewForRecord(Model $ownerRecord, string $pageClass): bool
{
return true/false;
}
public static function canViewForRecord(Model $ownerRecord, string $pageClass): bool
{
return true/false;
}
5 replies
FFilament
Created by vitali on 4/19/2024 in #❓┊help
How I can integrate AI inside filamentphp?
Also, will expand a bit on your original question:
AI must tell him tespt to do to reduce costs, better organizations of resources, calendars, tasks, expenses and so on...
This will be a dangerous road. Like seriously, I wouldn't trust the AI with this at all.
My question is , how does it work? AI must read actual data and process the data to give answers? OR how? Need to implement custom models code?
You have to compile your data into an AI prompt. A few words in a prompt can completely change the output. So you have to be really careful. And no, you don't need to add any custom code. It is all about context/implementation. Only thing to keep in mind - AI is stupid. Like toddler level stupid. It will do what you ask it to do, but it doesn't mean you need to trust it. I've worked on AI for 6 months in various forms and... I would not trust it to make any decision. An advice? sure, but then I would do my own research. But never a full decision.
5 replies
FFilament
Created by vitali on 4/19/2024 in #❓┊help
How I can integrate AI inside filamentphp?
Of course, it has python at the endpoint, but... you can definitely build a PHP one! It's as simple as using a https://github.com/beyondcode/laravel-ask-database (not the package itself, but the code and idea) and then building a connection in-between.
5 replies
FFilament
Created by vitali on 4/19/2024 in #❓┊help
How I can integrate AI inside filamentphp?
Free resource from our team (laraveldaily) on exactly that: https://pythonmldaily.com/courses/python-chatbot-database-cars
5 replies
FFilament
Created by Helge Sverre on 4/17/2024 in #❓┊help
How to set the "primary" table action?
So that's exactly what you can do with that 🙂 I'm not sure about any other way 😄
7 replies
FFilament
Created by Helge Sverre on 4/17/2024 in #❓┊help
How to set the "primary" table action?
It will allow you to customize the record url 🙂
7 replies
FFilament
Created by Helge Sverre on 4/17/2024 in #❓┊help
How to set the "primary" table action?
7 replies