P
P
Programmir2017-03-25 16:53:58
Laravel
Programmir, 2017-03-25 16:53:58

Is it worth checking that given method is post in laravel?

For example, I have a
Route::post( router,
should it check if($request->isMethod('post')){
or is this an unnecessary check?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Victor, 2017-03-25
@v_decadence

Needless to say, Laravel won't pass another method request if it's not set in the routes.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question