J
J
jazzus2019-01-16 13:03:24
Laravel
jazzus, 2019-01-16 13:03:24

Is it possible to store the route in a variable?

For example in the form of text.
type: so that later in the UPDATE component the second option is to save the name of the route. The author, whose idea was and who for some reason deleted - write in the solution, I will mark it.
$route = "route('update.role', $id)";
href="{{ $route }}"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
Konstantin B., 2019-01-16
@jazzus

You answered your own question, only quotes are not needed
$route = route('update.role', $id);

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question