title: Laravel 5 and Entrust. How to save user and attach role at the same time
body: <p>Has anyone tried Entrust for User Roles &amp; Permissions in Laravel 5?</p>
  
  <p>I want to add and save user and attach role into it at the same time. here's my code</p>
  
  <pre><code>     $role = Role::where('name','=','admin')-&gt;first();
       $user = new User();
       $user-&gt;name = Input::get('name');
       $user-&gt;email = Input::get('email');
       $user-&gt;password = Hash::make(Input::get('password'));
        if($user-&gt;save()){
            $user-&gt;attachRole($role);
            return redirect('dashboard/users')-&gt;with('success-message','New user has been added');
        }
  </code></pre>
  
  <p>But <code>$user-&gt;attachRole($role);</code> won't work though it works on my <code>databaseSeeder</code> but not on my UserController.</p>