Support the ongoing development of Laravel.io →
Input
Last updated 3 months ago.
0

$someInput = Request::input('someInput');

0

@resethread what you suggest it's muddy solution,cause it can throw exception because you are calling a non static method statically.

Last updated 6 years ago.
0

I think you could catch the Request object
public function index() { return view('addproduct'); }

public function save(Request $request)
{   
    echo $productname = $request->input('productname');
}
Last updated 6 years ago.
0

jay4yam said:

I think you could catch the Request object
public function index() { return view('addproduct'); }

public function save(Request $request) {
echo $productname = $request->input('productname'); }

THIS is the way to go. Injecting the Request into the method and using it is the preferred method.

0

Sign in to participate in this thread!

Cloudways

Your banner here too?

franklinfs franklinfs franklinfs Joined 14 Apr 2015

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.