Laravel 5:Class 'Input' Not Found

laravel 5 : Class 'input' not found

It is Input and not input.
This commit removed Input facade definition from config/app.php hence you have to manually add that in to aliases array as below,

'Input' => Illuminate\Support\Facades\Input::class,

Or You can import Input facade directly as required,

use Illuminate\Support\Facades\Input;

Class '...\Input' not found

Try this

config/app.php

use Request instead of Input

'aliases' => [
....
'Input' => Illuminate\Support\Facades\Request::class,

And your controller

use Illuminate\Http\Request;

and remove use Illuminate\Support\Facades\Input; top of your code

Class 'Input' not found

Yes I Found Sollution
This i use and success

in config.php
'Input' => Illuminate\Support\Facades\Input::class,

and

in Controller
use Input;

Class 'Illuminate\Support\Facades\Input' not found

if you're using less version of Laravel 5.2

In config/app.php, replace:

'Input' => Illuminate\Support\Facades\Input::class,

Or You can import Input facade directly as required,

use Illuminate\Support\Facades\Input;

In Laravel 5.2 Input:: is replaced with Request::

use

Request::

Add to the top of Controller or any other Class

use Illuminate\Http\Request;

In your case

$image_tmp = $request->image;
$fileName = time() . '.'.$image_tmp->clientExtension();

Laravel 6X
The Input facade, which was primarily a duplicate of the Request facade, has been removed. If you are using the Input::get method, you should now call the Request::input method. All other calls to the Input facade may simply be updated to use the Request facade.

You can directly use $request as well

$request->all();

Laravel 7.21 Class Illuminate\Support\Facades\Input not found

Based on the Laravel docs, since version 6.x Input has been removed.

The Input facade, which was primarily a duplicate of the Request
facade, has been removed. If you are using the Input::get method, you
should now call the Request::input method. All other calls to the
Input facade may simply be updated to use the Request facade.



Related Topics



Leave a reply



Submit