修复时间不正确的 bug

This commit is contained in:
Wisp X 2022-04-19 11:13:03 +08:00
parent 5bba6d0d52
commit 02b9695882
8 changed files with 18 additions and 14 deletions

View File

@ -5,7 +5,6 @@ namespace App\Models;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Http\Request;

View File

@ -3,7 +3,6 @@
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
/**
* @property string $name

View File

@ -3,10 +3,8 @@
namespace App\Models;
use App\Utils;
use Carbon\Carbon;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Support\Collection;

View File

@ -6,11 +6,10 @@ use App\Enums\GroupConfigKey;
use App\Enums\ImagePermission;
use App\Services\ImageService;
use App\Utils;
use Carbon\Carbon;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
use Illuminate\Http\Request;
use Illuminate\Support\Collection;

13
app/Models/Model.php Normal file
View File

@ -0,0 +1,13 @@
<?php
namespace App\Models;
use Carbon\CarbonInterface;
abstract class Model extends \Illuminate\Database\Eloquent\Model
{
protected function serializeDate(\DateTimeInterface $date): string
{
return $date->format(CarbonInterface::DEFAULT_TO_STRING_FORMAT);
}
}

View File

@ -3,14 +3,13 @@
namespace App\Models;
use App\Enums\StrategyKey;
use Carbon\Carbon;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Collection;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsToMany;
use Illuminate\Database\Eloquent\Relations\HasMany;
use Illuminate\Filesystem\Filesystem;
use Illuminate\Support\Carbon;
/**
* @property int $id

View File

@ -3,11 +3,8 @@
namespace App\Models;
use App\Enums\ConfigKey;
use App\Enums\ImagePermission;
use App\Enums\PastedAction;
use App\Enums\UserConfigKey;
use App\Utils;
use Carbon\Carbon;
use Illuminate\Support\Carbon;
use Illuminate\Contracts\Auth\MustVerifyEmail;
use Illuminate\Database\Eloquent\Casts\Attribute;
use Illuminate\Database\Eloquent\Factories\HasFactory;

View File

@ -32,7 +32,7 @@ use App\Models\Strategy;
use App\Models\User;
use App\Utils;
use Aws\S3\S3Client;
use Carbon\Carbon;
use Illuminate\Support\Carbon;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;