From 94446e0174df5ddfc7442f2a48f09707fde7b269 Mon Sep 17 00:00:00 2001 From: shibafu Date: Fri, 24 Jul 2020 12:02:27 +0900 Subject: [PATCH] use softdelete --- app/CheckinWebhook.php | 3 +++ .../2020_07_19_173931_create_checkin_webhooks_table.php | 1 + 2 files changed, 4 insertions(+) diff --git a/app/CheckinWebhook.php b/app/CheckinWebhook.php index b518f5b..9c8300b 100644 --- a/app/CheckinWebhook.php +++ b/app/CheckinWebhook.php @@ -3,10 +3,13 @@ namespace App; use Illuminate\Database\Eloquent\Model; +use Illuminate\Database\Eloquent\SoftDeletes; use Illuminate\Support\Str; class CheckinWebhook extends Model { + use SoftDeletes; + /** @var int ユーザーごとの作成数制限 */ const PER_USER_LIMIT = 10; diff --git a/database/migrations/2020_07_19_173931_create_checkin_webhooks_table.php b/database/migrations/2020_07_19_173931_create_checkin_webhooks_table.php index 6446464..c3ac821 100644 --- a/database/migrations/2020_07_19_173931_create_checkin_webhooks_table.php +++ b/database/migrations/2020_07_19_173931_create_checkin_webhooks_table.php @@ -18,6 +18,7 @@ class CreateCheckinWebhooksTable extends Migration $table->integer('user_id')->nullable(); $table->string('name'); $table->timestamps(); + $table->softDeletes(); $table->primary('id');