title: Creating user in Laravel 5
body: <p>So I am following this <a href="http://www.toptal.com/web/cookie-free-authentication-with-json-web-tokens-an-example-in-laravel-and-angularjs" rel="noreferrer">angular/Laravel 5 tutorial</a> using JSON web Tokens. I am running into an issue.</p>
  <p>Here is how it says create a user:</p>
  <pre><code>Route::post('/signup', function () {
     $credentials = Input::only('email', 'password','name');
  
     try {
         $user = User::create($credentials);
     } catch (Exception $e) {
         return Response::json(['error' =&gt; 'User already exists.'], Illuminate\Http\Response::HTTP_CONFLICT);
     }
  
     $token = JWTAuth::fromUser($user);
  
     return Response::json(compact('token'));
  });
  </code></pre>
  <p>The problem is, <code>User::create($credentials);</code> does not encrypt the password, meaning, logins will always fail. I found this out by using Laravel's default registration.</p>
  <p>My question is, how do I create a new user that creates it the correct way?</p>