Attaching roles in laravel 5.3(in which file or controller)

public function attachRole()
{
   $user = User::find(2);

    $user->attachRole($this->adminRole);
  }
}