First of all, your problem is to write the input class, and instead of input, the input. And you need to import a class with a good namespace.
use Illuminate\Support\Facades\Input;
If you want it to be called "input" and not "Input", add this:
use Illuminate\Support\Facades\Input as input;
Secondly, this is a dirty way to store in the database via route.php, and you are not processing data validation. If the parameter sent does not match what was expected, an SQL error may occur caused by the data type. You must use the controller to interact with the information and store through the model in the controller method.
The route.php file handles routing. It is designed to establish communication between the controller and the requested route.
To learn about the controller, middleware, model, service ... http://laravel.com/docs/5.1/
If you need more information, a solution to the problem you can join the community: https://laracasts.com/
Sincerely.
Disfigure Jul 29 '15 at 9:48 2015-07-29 09:48
source share