软删除及其相关实现 在模型类中要使用SoftDeletestrait并设置$date属性数组 <?php namespace App\Models; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\SoftDeletes; class Student extends Model { use SoftDeletes; //设置表名 public $table = 'students'; //设置主键…