Browse Source

微修正

develop
sosuke.iwabuchi 2 years ago
parent
commit
2c9f483ab5
2 changed files with 3 additions and 2 deletions
  1. +1
    -1
      app/Http/Controllers/Web/BaseParam.php
  2. +2
    -1
      app/Models/BaseModel.php

+ 1
- 1
app/Http/Controllers/Web/BaseParam.php View File

@@ -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)) {


+ 2
- 1
app/Models/BaseModel.php View File

@@ -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


Loading…
Cancel
Save