I
I
Ivan Ivanov2019-11-15 02:51:53
Laravel
Ivan Ivanov, 2019-11-15 02:51:53

How to make optional part in uri in route in laravel?

For example, such a plan - some_uri/page/{page} - but so that you can refer to both some_uri and some_uri/page/5 . Those. /page/{page} - optional part of uri. Thank you.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
DevMan, 2019-11-15
@romalu

why?
it can be done , but often it is evidence of conceptual infidelity.

K
Konstantin B., 2019-11-15
@Kostik_1993

Just use what the knowledgeable people have written

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question