diff --git a/app/Models/Schedule.php b/app/Models/Schedule.php index 6202952baf31..42442363e90e 100644 --- a/app/Models/Schedule.php +++ b/app/Models/Schedule.php @@ -18,6 +18,7 @@ use Carbon\Carbon; use Illuminate\Database\Eloquent\Builder; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; use McCool\LaravelAutoPresenter\HasPresenter; /** @@ -27,7 +28,7 @@ */ class Schedule extends Model implements HasPresenter { - use SearchableTrait, SortableTrait, ValidatingTrait; + use SearchableTrait, SoftDeletes, SortableTrait, ValidatingTrait; /** * The upcoming status. diff --git a/database/migrations/2018_06_14_201440_AlterSchedulesSoftDeletes.php b/database/migrations/2018_06_14_201440_AlterSchedulesSoftDeletes.php new file mode 100644 index 000000000000..fb802abaaafd --- /dev/null +++ b/database/migrations/2018_06_14_201440_AlterSchedulesSoftDeletes.php @@ -0,0 +1,41 @@ +softDeletes(); + }); + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + Schema::table('schedules', function (Blueprint $table) { + $table->dropSoftDeletes(); + }); + } +}