删除无用代码
This commit is contained in:
parent
59e3ddb9c1
commit
c56b37667f
|
@ -18,7 +18,6 @@ class UserController extends Controller
|
|||
//3个用户为一页
|
||||
$users = User::paginate(3);
|
||||
return UserResource::collection($users);
|
||||
return $users;
|
||||
}
|
||||
//返回单一用户信息
|
||||
public function show(User $user){
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
class Book extends Model
|
||||
{
|
||||
|
||||
protected $table = 'books';
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*
|
||||
* @var array
|
||||
*/
|
||||
protected $fillable = [
|
||||
'user_id', 'name'
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue