title: Laravel 5.2 - Method auth does not exist
body: <p>I recently cloned a Laravel 5.2 project. After running <code>composer install</code>, I keep getting the following error after every Artisan command and when trying to access the app:</p>
  
  <blockquote>
    <p>Method auth does not exist</p>
  </blockquote>
  
  <p>I could find similar "method does not exist" issues online, but nothing about 'auth'. I believe the 'auth' class being referred to is the built-in one that can be used as middleware for various routes. However, I have no idea how to solve the issue.</p>
  
  <p>I've tried:</p>
  
  <ul>
  <li>composer dump-autoload -o</li>
  <li>deleting the vendor libraries and reinstalling with composer</li>
  <li>resetting to the remote branch</li>
  <li>re-cloning the repository</li>
  <li>running under PHP 5.6 and 7.1</li>
  </ul>
  
  <p>Any help would be greatly appreciated!</p>
  
  <p>My composer file:</p>
  
  <pre><code>{
  "name": "laravel/laravel",
  "description": "The Laravel Framework.",
  "keywords": ["framework", "laravel"],
  "license": "MIT",
  "type": "project",
  "require": {
      "php": "&gt;=5.5.9",
      "laravel/framework": "5.2.*",
      "gloudemans/calendar": "dev-master",
      "zizaco/entrust": "5.2.x-dev",
      "laravelcollective/html": "5.2.*",
      "guzzlehttp/guzzle": "~6.0",
      "predis/predis": "~1.0",
      "aws/aws-sdk-php": "~3.0",
      "mpociot/laravel-apidoc-generator": "^2.0"
  },
  "require-dev": {
      "fzaninotto/faker": "~1.4",
      "mockery/mockery": "0.9.*",
      "phpunit/phpunit": "~4.0",
      "phpspec/phpspec": "~2.1",
      "symfony/dom-crawler": "~3.0",
      "symfony/css-selector": "~3.0"
  },
  "autoload": {
      "classmap": [
          "database"
      ],
      "psr-4": {
          "App\\": "app/"
      }
  },
  "autoload-dev": {
      "classmap": [
          "tests/TestCase.php"
      ]
  },
  "scripts": {
  
      "pre-update-cmd": [
          "php artisan clear-compiled"
      ],
      "post-update-cmd": [
          "php artisan optimize"
      ],
      "post-root-package-install": [
          "php -r \"copy('.env.example', '.env');\""
      ],
      "post-create-project-cmd": [
          "php artisan key:generate"
      ]
  },
  "config": {
      "preferred-install": "dist"
  } 
  }
  </code></pre>
  
  <p>The error's stack trace from the laravel.log file:</p>
  
  <blockquote>
    <p>[2018-05-01 12:49:56] local.ERROR: BadMethodCallException: Method auth does not exist. in /Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Support/Traits/Macroable.php:81
    Stack trace:</p>
    
    <ol>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Support/Facades/Facade.php(213): Illuminate\Routing\Router->__call('auth', Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/app/Http/routes.php(424): Illuminate\Support\Facades\Facade::__callStatic('auth', Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/app/Providers/RouteServiceProvider.php(41): require('/Applications/X...')</li>
    <li>[internal function]: App\Providers\RouteServiceProvider->App\Providers{closure}(Object(Illuminate\Routing\Router))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Routing/Router.php(354): call_user_func(Object(Closure), Object(Illuminate\Routing\Router))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/app/Providers/RouteServiceProvider.php(42): Illuminate\Routing\Router->group(Array, Object(Closure))</li>
    <li>[internal function]: App\Providers\RouteServiceProvider->map(Object(Illuminate\Routing\Router))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php(72): Illuminate\Container\Container->call(Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Support/Providers/RouteServiceProvider.php(31): Illuminate\Foundation\Support\Providers\RouteServiceProvider->loadRoutes()</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/app/Providers/RouteServiceProvider.php(29): Illuminate\Foundation\Support\Providers\RouteServiceProvider->boot(Object(Illuminate\Routing\Router))</li>
    <li>[internal function]: App\Providers\RouteServiceProvider->boot(Object(Illuminate\Routing\Router))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Container/Container.php(507): call_user_func_array(Array, Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(734): Illuminate\Container\Container->call(Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(717): Illuminate\Foundation\Application->bootProvider(Object(App\Providers\RouteServiceProvider))
    15 [internal function]: Illuminate\Foundation\Application->Illuminate\Foundation{closure}(Object(App\Providers\RouteServiceProvider), 16)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(718): array_walk(Array, Object(Closure))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Bootstrap/BootProviders.php(17): Illuminate\Foundation\Application->boot()</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Application.php(203): Illuminate\Foundation\Bootstrap\BootProviders->bootstrap(Object(Illuminate\Foundation\Application))</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(208): Illuminate\Foundation\Application->bootstrapWith(Array)</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/vendor/laravel/framework/src/Illuminate/Foundation/Console/Kernel.php(105): Illuminate\Foundation\Console\Kernel->bootstrap()</li>
    <li>/Applications/XAMPP/xamppfiles/htdocs/[ProjectName]/artisan(35): Illuminate\Foundation\Console\Kernel->handle(Object(Symfony\Component\Console\Input\ArgvInput), Object(Symfony\Component\Console\Output\ConsoleOutput))</li>
    <li>{main}</li>
    </ol>
  </blockquote>