Fatal error: Class 'App\Http\Controllers\Input' not found when sending a form

fatal error: uncaught error: class
php fatal error: class not found
php fatal error uncaught error class not found namespace
uncaught error class member not found in
how to load classes in php
php load class from file
class phpoptionoption not found
php autoload class

I'm trying to send an email filled with a form from a Laravel app.

When you hit submit it throws the above error:

Fatal error: Class 'App\Http\Controllers\Input' not found

Not sure why as I don't have, nor knew I needed to have an Input controller, or what I would put in it.

Below is the content of the controller:


namespace App\Http\Controllers;

use Illuminate\Http\Request;

use App\Http\Requests;

class contact extends Controller
     // This function will show the view
    public function showForm()
        return view('pages.contact');

     public function handleFormPost()
         $input = Input::only('name', 'email', 'msg');

         $validator = Validator::make($input,
                 'name' => 'required',
                 'email' => 'required|email',
                 'msg' => 'required',

         if ($validator->fails())
             return Redirect::to('contact')->with('errors', $validator->messages());
         } else { // the validation has not failed, it has passed

            // Send the email with the contactemail view, the user input
            Mail::send('contactemail', $input, function($message)
                 $message->from('idocompscihw@gmail.com', 'Your Name');


             // Specify a route to go to after the message is sent to provide the user feedback
             return Redirect::to('thanks');


Below is the view of the forum (based on bootstrap):

<div class="container">
    <h1>A basic contact form</h1>
    <form id="contact" method="post" class="form" role="form">

            <div class="alert alert-warning">
                @foreach(Session::get('errors')->all() as $error_message)
                    <p>{{ $error_message }}</p>

        <div class="row">
            <div class="col-xs-6 col-md-6 form-group">
                <input type="hidden" name="_token" value="{{ csrf_token() }}">
                <input class="form-control" id="name" name="name" placeholder="Name" type="text"autofocus="">
            <div class="col-xs-6 col-md-6 form-group">
                <input class="form-control" id="email" name="email" placeholder="Email" type="text">
        <textarea class="form-control" id="message" name="msg" placeholder="Message" rows="5"></textarea>
        <div class="row">
            <div class="col-xs-12 col-md-12 form-group">
                <button class="btn btn-primary pull-right" type="submit">Submit</button>

Used this in your contact.php Controllers-

use Illuminate\Support\Facades\Input;

your error will get fixed. Thanks.

php - How to fix "Class '' not found" error, Tips to help resolve the issue of "Class '' not found", when using composer Fatal error: Class 'PHPUnit\Framework\TestCase' not found in� " Fatal error: Class 'PHPUnit\Framework\TestCase' not found in C:\wamp\www\php_osmessa\tests\TileTest.php on line 9 " but the class exist and there is a autoload file all that download from github project.

Input:: is replaced with Request::. Instead of

$input = Input::only('name', 'email', 'msg');

use this:

$input = Request::only('name', 'email', 'msg');

And if you get error something about 'should not use statically' just add this at the top of your file

use Request;

If you already have this line:

use Illuminate\Http\Request;

delete it because you can't have two classes with the same name in one file

Fatal error: Class 'PLL_CRUD_Posts, [This thread is closed.] I've upgrade Lingotek… if i try to open my admin i got a fatal error: Class 'PLL_CRUD_Posts' not… Do the following: Locate php.ini in your xamppfolder Remove the ; from the beginning of extension=php_soap.dll Restart your web server Look up your phpinfo(); again and check if you see a similar picture to the one above If you do, problem solved!

public function handleFormPost(Request $request)
    $name = $request->get('name');
    $email = $request->get('email');
    $msg = $request->get('msg');   


public function handleFormPost(Request $request)
    $input = $request->all();   

"PHP Fatal error: Uncaught Error: Class 'Locale' not found" Fix for , "PHP Fatal error: Uncaught Error: Class 'Locale' not found" Fix for cPanel. Sheldon P., Co-founder & Technical Director 2019-12-02. facebook � twitter � linkedin� Fatal error: Class 'imagick' not found. Ask Question Asked 6 years, 3 months ago. Active 1 year, 9 months ago. Viewed 59k times 23. 1. I am trying

you not use input try this :

use Input;

Put it after the namespace declaration like this


namespace App\Http\Controllers; 
use Input;


Fatal error: Uncaught Error: Class 'WP_Block_Styles_Registry , From this post on WordPress.org "Fixing fatal error after 5.30 update", it mentions issues with Gutenberg. I installed the Glutenberg plugin and� Fatal error: Class 'Memcached' not found. the library might be missing, you can manually include the missing php_memcache into the ext folder. share

Fatal error: Class 'FacebookCommonUtils' not found � Issue #277 , 39. when we are update our facebook ad Extension v2.1.12. After the updates we are getting error on our website home page Fatal error: Class '� If a program is given an exception that is invalid or unknown, you'll encounter a fatal exception. Fatal exceptions are also commonly referred to as a Fatal 0E, or improperly as a Fatal OE. When a fatal exception is encountered, the error is in the following format. A fatal exception <YZ> has occurred at xxxx:xxxxxxxx

PHP Fatal error: Uncaught Error: Class '' not found � Issue #3062 , PHP Fatal error: Uncaught Error: Class '' not found #3062. Closed. teohhanhui opened this issue on Mar 5 � 2 comments. Closed� Fatal error: Class 'Illuminate\Foundation\Application' not found in C:\cms\bootstrap\app.php on line 14 Solution: I delete the project on local and do a clone again, after that I checkout to my laravel file work's branch and do composer update then it is fixed.

PhpStorm: PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter', PhpStorm: PHP Fatal error: Class 'PHPUnit_TextUI_ResultPrinter'. Published on Friday 27, April 2018. Recently I ran a good ole composer update on a client� Hey Indu, it looks like it works now? In the case that a plugin (or a theme) makes a problem and you can’t log in tto your admin-dashboard to fix that, you can deactivate the plugin via the ftp.

  • Possible duplicate of laravel 5 : Class 'input' not found
  • where would I put that?
  • <?php namespace App\Http\Controllers; use Input;