Skip to content

Commit

Permalink
移动 User 模型到 app/models 目录
Browse files Browse the repository at this point in the history
  • Loading branch information
summerblue committed Sep 19, 2019
1 parent e776e83 commit bcdbd08
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/Http/Controllers/Auth/RegisterController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
namespace App\Http\Controllers\Auth;

use App\Http\Controllers\Controller;
use App\User;
use App\Models\User;
use Illuminate\Foundation\Auth\RegistersUsers;
use Illuminate\Support\Facades\Hash;
use Illuminate\Support\Facades\Validator;
Expand Down Expand Up @@ -63,7 +63,7 @@ protected function validator(array $data)
* Create a new user instance after a valid registration.
*
* @param array $data
* @return \App\User
* @return \App\Models\User
*/
protected function create(array $data)
{
Expand Down
3 changes: 2 additions & 1 deletion app/User.php → app/Models/User.php
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
<?php

namespace App;
namespace App\Models;

use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;


class User extends Authenticatable
{
use Notifiable;
Expand Down
2 changes: 1 addition & 1 deletion config/auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
'providers' => [
'users' => [
'driver' => 'eloquent',
'model' => App\User::class,
'model' => App\Models\User::class,
],

// 'users' => [
Expand Down
2 changes: 1 addition & 1 deletion database/factories/UserFactory.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */
use App\User;
use App\Models\User;
use Faker\Generator as Faker;
use Illuminate\Support\Str;

Expand Down

0 comments on commit bcdbd08

Please sign in to comment.