title: Controller doesn't work in route.php in Laravel
body: <p>I was working on a project that works fine and I now I have restored a backup of the project, the project and the backup is identical, I also change the backup name to the original name and now the controllers inside route.php doesn't work.</p>
  
  <p>For do the backup and restore it I did</p>
  
  <pre><code>cp -r project/ project_backup
  rm -r project
  cp -r project_backup/ project
  </code></pre>
  
  <p>In my routes.php I have:</p>
  
  <pre><code>&lt;?php
  
  /*
  |--------------------------------------------------------------------------
  | Routes File
  |--------------------------------------------------------------------------
  |
  | Here is where you will register all of the routes in an application.
  | It's a breeze. Simply tell Laravel the URIs it should respond to
  | and give it the controller to call when that URI is requested.
  |
  */
  
  
  
  /*
  |--------------------------------------------------------------------------
  | Application Routes
  |--------------------------------------------------------------------------
  |
  | This route group applies the "web" middleware group to every route
  | it contains. The "web" middleware group is defined in your HTTP
  | kernel and includes session state, CSRF protection, and more.
  |
  */
  
  Route::get("/password", function(){
          $password = Hash::make('12345678');
          echo $password;
      });
  Route::get('/login', 'UserController@getLogin');
  </code></pre>
  
  <p>When I enter in /password in a web browser its work fine. The output is:</p>
  
  <pre><code>$2y$10$.grNtTpANndXN0V3/rn9buSO470jPEeVWVyc00rupU6iNt9G.DMZC
  </code></pre>
  
  <p>But when I enter in /login I get </p>
  
  <blockquote>
    <p>GET 
    <a href="http://project/public/index.php/login" rel="nofollow">http://project/public/index.php/login</a> [HTTP/1.0 500 Internal Server Error 247ms]</p>
  </blockquote>
  
  <p>in my UserController I have:</p>
  
  <pre><code>public function getLogin(){
          Log::info("getLogin");
          $password = Hash::make('12345678');
          echo $password;
      }
  </code></pre>
  
  <p>In fact, the laravel.log doesn't log anything. it seem that this function doesn't execute.</p>
  
  <p>Why controller doesn't work?</p>
  
  <p>My version of laravel is:</p>
  
  <blockquote>
    <p>Laravel Framework version 5.2.30</p>
  </blockquote>
  
  <p>Thanks</p>
  
  <p>Edit: UserController.php code</p>
  
  <pre><code>&lt;?php
  
  namespace Ordered\Http\Controllers;
  
  use Ordered\User;
  
  use Illuminate\Http\Request;
  
  use Ordered\Http\Requests;
  
  use Auth;
  
  use Log;
  
  class UserController extends Controller
  {
      /**
       * Display a listing of the resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function index()
      {
          //
          $user = User::all();
          return response()-&gt;json(["error"=&gt;false, "data"=&gt;$user-&gt;load("bars")],200);
      }
  
      public function getLogin(){
          Log::info("getLogin");
          $password = Hash::make('12345678');
          echo $password;
      }
  
      public function postLogin(Request $request){
          $input = $request-&gt;all();
          Log::info($input["email"]);
          Log::info($input["password"]);
          if (Auth::attempt(['email' =&gt; $input["email"], 'password' =&gt; $input["password"]], true))
          {
              Log::info("postInfo");
              return redirect()-&gt;intended('/tables');
          }
  
      }
  
      public function apiLogin(Request $request){
          $input = $request-&gt;all();
          if (Auth::attempt(['username' =&gt; $request-&gt;header("u"), 'password' =&gt; $request-&gt;header("p")]))
          {
              return response()-&gt;json(["error"=&gt;false, "data"=&gt;Auth::user()-&gt;load("bars")],200);
          }
          return response()-&gt;json(["error"=&gt;true, "data"=&gt;""],401);
      }
  
      /**
       * Show the form for creating a new resource.
       *
       * @return \Illuminate\Http\Response
       */
      public function create()
      {
          //
      }
  
      /**
       * Store a newly created resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @return \Illuminate\Http\Response
       */
      public function store(Request $request)
      {
          //
      }
  
      /**
       * Display the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function show($id)
      {
          //
      }
  
      /**
       * Show the form for editing the specified resource.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function edit($id)
      {
          //
      }
  
      /**
       * Update the specified resource in storage.
       *
       * @param  \Illuminate\Http\Request  $request
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function update(Request $request, $id)
      {
          //
      }
  
      /**
       * Remove the specified resource from storage.
       *
       * @param  int  $id
       * @return \Illuminate\Http\Response
       */
      public function destroy($id)
      {
          //
      }
  }
  </code></pre>