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