202508220953
修正 updated_at 不寫記錄
This commit is contained in:
parent
bb1defcc98
commit
680a388e89
@ -25,7 +25,7 @@ class RoomObserver
|
||||
public function updated(Room $room): void
|
||||
{
|
||||
// 檢查是否有變更狀態
|
||||
if ($room->wasChanged()) {
|
||||
if ($room->wasChanged(array_diff(array_keys($room->getChanges()), ['updated_at']))) {
|
||||
$this->createStatusLog($room);
|
||||
}
|
||||
if ($room->isDirty('status')) {
|
||||
|
@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*/
|
||||
public function up(): void
|
||||
{
|
||||
Schema::create('FavoriteSongs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('songNumber',20);
|
||||
$table->string('userPhone', 10);
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('FavoriteSongs');
|
||||
}
|
||||
};
|
Loading…
x
Reference in New Issue
Block a user