202508220953

修正 updated_at 不寫記錄
This commit is contained in:
allen.yan 2025-08-22 09:54:26 +08:00
parent bb1defcc98
commit 680a388e89
2 changed files with 1 additions and 30 deletions

View File

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

View File

@ -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');
}
};