删除无用代码

This commit is contained in:
guaosi 2019-03-13 14:35:42 +08:00
parent 59e3ddb9c1
commit c56b37667f
2 changed files with 17 additions and 1 deletions

View File

@ -18,7 +18,6 @@ class UserController extends Controller
//3个用户为一页
$users = User::paginate(3);
return UserResource::collection($users);
return $users;
}
//返回单一用户信息
public function show(User $user){

17
app/Models/Book.php Normal file
View File

@ -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'
];
}