Support the ongoing development of Laravel.io →
Requests Validation Testing
Last updated 2 years ago.
0

I think you can do it easy way,

First try to create some controller and add this mehod.

route.

Route::put('putting', 'PuttingController@putting');

putting controller and add putting method.

    public function putting(Request $request, $id)
    {
        $email = $request->get('email');
        dd($email);    
    }

you can check is method == PUT by

$request->isMethod('PUT')

but it no need to check because we make a rule on route already.

--- Edit ---

The easy way to make an API.

Laravel provided the Route::resource

see DOC http://laravel.com/docs/5.1/controllers#restful-resource-controllers

Last updated 9 years ago.
0

Thanks dogrocker, it worked !! You helped me a lot.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.