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 theInput::get
method, you
should now call theRequest::input
method. All other calls to the
Input facade may simply be updated to use the Request facade.
Related Topics
How to Extract HTML Comments and All HTML Contained by Node
Replace Values in a Uri Query String
Simplexml Soap Response Namespace Issues
How to Use an Object Method as a Callback Function
Upload Doesn't Work Right When the File Is Too Big
Parse Error: Syntax Error, Unexpected '' (T_Encapsed_And_Whitespace)
How to Stop PHP Sleep() Affecting My Whole PHP Code
Parse Math Operations with PHP
How to Generate an .Xlsx Using PHP
Populate Select Drop Down from a Database Table
How to Get User's Screen Resolution with PHP
Printing Content of a Xml File Using Xml Dom
Tcpdf Error :Unable to Get the Size of the Image
Auto Increment Skipping Numbers