S
S
StrangeGoogle2020-10-31 14:13:42
Laravel
StrangeGoogle, 2020-10-31 14:13:42

How to show/hide a field from a table under certain conditions?

How to show the secret field and hide it by default?

Show on condition of authorization and active subscription at the same time?

It turns out that we are working with two tables - subscriptions and a table that has a secret field.

Tell me please. I came across Resources in the documentation, but at the same time, I'm not sure. I would be very happy with a detailed answer. Where and what to check ... I thought in the default model to hide the field, make it secret, but in the controller already process whether to show it or not. This method is quite working for me, but I want to know how to do it correctly ... thanks!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
pLavrenov, 2020-10-31
@StrangeGoogle

Laravel Resource - mergeWhen

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question