From 46a2b78d3fcb696730770dbfe1f00a16a7195b74 Mon Sep 17 00:00:00 2001 From: Alireza Date: Mon, 15 May 2017 12:49:14 +0430 Subject: [PATCH] Support custom column name for softDeletes() --- src/Illuminate/Database/Schema/Blueprint.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Illuminate/Database/Schema/Blueprint.php b/src/Illuminate/Database/Schema/Blueprint.php index 5077f1ac69fc..ff30d28a8496 100755 --- a/src/Illuminate/Database/Schema/Blueprint.php +++ b/src/Illuminate/Database/Schema/Blueprint.php @@ -824,11 +824,12 @@ public function timestampsTz() /** * Add a "deleted at" timestamp for the table. * + * @param string $column * @return \Illuminate\Support\Fluent */ - public function softDeletes() + public function softDeletes($column = 'deleted_at') { - return $this->timestamp('deleted_at')->nullable(); + return $this->timestamp($column)->nullable(); } /**