Is it possible to display different entities depending on the request? #11
Answered
by
awcodes
Julien-degardin
asked this question in
Q&A
|
Hello guys! I have two pages that I use as "dashboards" where I'd like to show different entities depending on the page (or URL). Thank you! PS: I tried to use if ($_SERVER['REQUEST_URI'] === "/admin/dashboard-stock") {but I'm getting this error "array_merge(): Argument 2 must be of type array, int given" |
Answered by
awcodes
May 9, 2023
Replies: 1 comment 3 replies
|
Where are you using the conditional? That's tricky since widgets are Livewire components and they can't be instantiated. Meaning they can't be dynamically registered with options. You could probably create your own Widget that extends the Overlook widget and manually set the resources there. Then you could register the right widget in the context you need it it. |
3 replies
Answer selected by
Julien-degardin
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where are you using the conditional?
That's tricky since widgets are Livewire components and they can't be instantiated. Meaning they can't be dynamically registered with options. You could probably create your own Widget that extends the Overlook widget and manually set the resources there. Then you could register the right widget in the context you need it it.