title: Too few arguments to function Illuminate\Database\Eloquent\Model::setAttribute(), 1 passed
body: <p>i want to ask about error "Too few arguments to function Illuminate\Database\Eloquent\Model::setAttribute(), 1 passed "</p>
  
  <p>i try to register users, i use php artisan make:auth to build my authentication. But, i add one field in users migration. and i try to use uuid. this is my code :</p>
  
  <p><strong>User Model</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App;
  
  use Illuminate\Notifications\Notifiable;
  use Illuminate\Foundation\Auth\User as Authenticatable;
  use App\Traits\Uuids;
  class User extends Authenticatable
  {
  use Notifiable;
  use Uuids;
  /**
   * The attributes that are mass assignable.
   *
   * @var array
   */
  protected $guarded = ['id'];
  protected $table = 'users';
  protected $fillable = [
      'name', 'email', 'password','phone_number',
  ];
  
  
  /**
   * The attributes that should be hidden for arrays.
   *
   * @var array
   */
  protected $hidden = [
      'password', 'remember_token',
  ];
  }
  </code></pre>
  
  <p><strong>Register Controller</strong></p>
  
  <pre><code>&lt;?php
  
  namespace App\Http\Controllers\Auth;
  
  use App\User;
  use App\Http\Controllers\Controller;
  use Illuminate\Support\Facades\Hash;
  use Illuminate\Support\Facades\Validator;
  use Illuminate\Foundation\Auth\RegistersUsers;
  use Illuminate\Http\Request;
  
  class RegisterController extends Controller
  {
  /*
  |--------------------------------------------------------------------------
  | Register Controller
  |--------------------------------------------------------------------------
  |
  | This controller handles the registration of new users as well as their
  | validation and creation. By default this controller uses a trait to
  | provide this functionality without requiring any additional code.
  |
  */
  
  use RegistersUsers;
  
  /**
   * Where to redirect users after registration.
   *
   * @var string
   */
  protected $redirectTo = '/home';
  
  /**
   * Create a new controller instance.
   *
   * @return void
   */
  public function __construct()
  {
      $this-&gt;middleware('guest');
  }
  
  /**
   * Get a validator for an incoming registration request.
   *
   * @param  array  $data
   * @return \Illuminate\Contracts\Validation\Validator
   */
  protected function validator(array $data)
  {
      return Validator::make($data, [
          'name' =&gt; 'required|string|max:255',
          'email' =&gt; 'required|string|email|max:255|unique:users',
          'phone' =&gt; 'required|numeric|min:8',
          'password' =&gt; 'required|string|min:6|confirmed',
          'password_confirmation' =&gt; 'required|same:password',
      ]);
  }
  
  /**
   * Create a new user instance after a valid registration.
   *
   * @param  array  $data
   * @return \App\User
   */
  protected function create(array $data)
  {
      return User::create([
          'name' =&gt; $data['name'],
          'email' =&gt; $data['email'],
          'phone_number' =&gt; $data['phone'],
          'password' =&gt; Hash::make($data['password']),
      ]);
  }
  
  
  }
  </code></pre>
  
  <p><strong>Users Migration</strong></p>
  
  <pre><code>&lt;?php
  
  use Illuminate\Support\Facades\Schema;
  use Illuminate\Database\Schema\Blueprint;
  use Illuminate\Database\Migrations\Migration;
  
  class CreateUsersTable extends Migration
  {
  /**
   * Run the migrations.
   *
   * @return void
   */
  public function up()
  {
      Schema::create('users', function (Blueprint $table) {
          $table-&gt;uuid('id');
          $table-&gt;string('name');
          $table-&gt;string('email')-&gt;unique();
          $table-&gt;string('password');
          $table-&gt;integer('phone_number');
          $table-&gt;rememberToken();
          $table-&gt;timestamps();
      });
  }
  
  /**
   * Reverse the migrations.
   *
   * @return void
   */
  public function down()
  {
      Schema::dropIfExists('users');
  }
  }
  </code></pre>
  
  <p><strong>Uuids Trait</strong></p>
  
  <pre><code>&lt;?php
  namespace App\Traits;
  
  trait Uuids 
  {
  /**
   * 
   */
  protected static function boot()
  {
      parent::boot();
      static::creating(function ($model) {
          $model-&gt;{$model-&gt;uuid} = 
          str_replace('-', '', \Uuid::generate(4)-&gt;string);
      });
  }
  }
  </code></pre>
  
  <p>Please give me advice. Thank You. </p>