Replies: 1 comment
-
Hi @jfuentesa, I usually need some values in methods to check like "->canSee()" and branching. That's what "Autocompleting Public Properties" is for. You just have to declare a public property with the same key name, and it will be automatically assigned. For example public $user;
public function query(User $user) : array
{
return [
'user' => $user,
];
}
public function layout(): iterable
{
return [
Layout::rows([
Input::make('count')->readonly($this->user->anyBool)
])
];
} For |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello:
Is it possible to access the query returned data from the layout() method?
I'm using a instance attribute between the query() and layout() methods.
Beta Was this translation helpful? Give feedback.
All reactions