A
A
Anton2018-04-16 13:36:48
Laravel
Anton, 2018-04-16 13:36:48

How to get url parameters?

Hello. Do I have a put route of this kind, /entity/<id>how can I get this id using the request object?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
E
Entvon Svoun, 2018-04-16
Reytarovsky @Antonchik

Yuzai - Request::segment(1)

T
Tesla, 2018-04-16
@Tesla

request()->route()->parameter('id')

N
Nikolai Vasin, 2018-04-16
@talam0nal

request()->id

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question