From 2c9f483ab56b6722ebaa5911f28e22a337c6852f Mon Sep 17 00:00:00 2001 From: "sosuke.iwabuchi" Date: Fri, 9 Jun 2023 13:39:59 +0900 Subject: [PATCH] =?UTF-8?q?=E5=BE=AE=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Http/Controllers/Web/BaseParam.php | 2 +- app/Models/BaseModel.php | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/Web/BaseParam.php b/app/Http/Controllers/Web/BaseParam.php index b978455..c35b9b2 100644 --- a/app/Http/Controllers/Web/BaseParam.php +++ b/app/Http/Controllers/Web/BaseParam.php @@ -96,7 +96,7 @@ abstract class BaseParam implements IParam return intval($value); } if ($rule === self::BOOLEAN_) { - return (bool) $value; + return boolval($value); } if ($rule === self::DATE) { if (is_string($value)) { diff --git a/app/Models/BaseModel.php b/app/Models/BaseModel.php index 4ca6967..0eeead5 100644 --- a/app/Models/BaseModel.php +++ b/app/Models/BaseModel.php @@ -35,7 +35,8 @@ abstract class BaseModel extends Model implements IModelFeature public static function getBuilder(string $name = 'main'): Builder { - return DB::table(static::getTableName(), $name)->whereNull(static::COL_NAME_DELETED_AT); + return DB::table(static::getTableName(), $name) + ->whereNull($name . "." . static::COL_NAME_DELETED_AT); } public static function getTableName(): string