guitarnerd_
guitarnerd_
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
Noted! Thanks @Hugh Messenger
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
@Hugh Messenger one last question. Any idea where I can find all the possible parameters I can pass to the closure ?
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
Thanks for the explanation.
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
That's pretty neat!
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
and you can insert those in any order you want right ? and each of them is optional?
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
Yeah I think I need to read a bit more about closure to fully grasp it
28 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
Thanks everyone! I ended up rethinking how i'm doing it and opting for a different architecture
21 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
I thought it would know that using the positioning of the arguments
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
@Hugh Messenger Thanks a lot. it worked. I had no idea that was necessary.
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
I'm wondering if the reason could be related to the fact that the relation is a HasManyThrough
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
In case it's relevant the action is inside a relation manager
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
No description
28 replies
FFilament
Created by guitarnerd_ on 9/18/2023 in #❓┊help
Error in Action: "$ownerRecord must not be accessed before initialization"
it worked all of a sudden but $quote->id (or any attribute) is now null
28 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
hi! Is $table->getLivewire() in v2? it's not working for me
21 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
Thank you i'll check those answers
21 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
@awcodes Thank you. I'm using v2 and I managed to get it inside the view through the only place I managed to get it is inside the ViewField component using
{{ $evaluate(fn ($get) => $get('id')) }}
{{ $evaluate(fn ($get) => $get('id')) }}
but I was hoping I can get it in my RelationManager to query a model and pass the results to the view
21 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
I need it in the form inside a RelationManager.
class ItemsRelationManager extends RelationManager
{
protected static string $relationship = 'items';

protected static ?string $recordTitleAttribute = 'id';

public static function form(Form $form): Form
{
return $form
->schema(
function (RelationManager $livewire): array {
dd($livewire->ownerRecord);
....
}
}
class ItemsRelationManager extends RelationManager
{
protected static string $relationship = 'items';

protected static ?string $recordTitleAttribute = 'id';

public static function form(Form $form): Form
{
return $form
->schema(
function (RelationManager $livewire): array {
dd($livewire->ownerRecord);
....
}
}
ownerRecord gives me the data of the parent not the relation manager record
21 replies
FFilament
Created by guitarnerd_ on 9/15/2023 in #❓┊help
How to get record data or just id of a relation manager record.
@awcodes Thank you for your answer. I have an OrdersResource. Inside orders resource I have a RelationManager table containing the OrderItems. When the user clicks on an Order Item the form opens. Inside the form I want to have a table, using ViewField containing all the Quotes that can fulfill that OrderItem with an action button that awards that order to that quote.
21 replies