Add updated at timestamp

This commit is contained in:
myrmidex 2025-06-29 17:13:18 +02:00
parent 46ecce7b88
commit 948bca3f0a
6 changed files with 7 additions and 7328 deletions

View file

@ -4,6 +4,9 @@ APP_KEY=
APP_DEBUG=true APP_DEBUG=true
APP_URL=http://localhost APP_URL=http://localhost
WWWUSER=
WWWGROUP=
APP_LOCALE=en APP_LOCALE=en
APP_FALLBACK_LOCALE=en APP_FALLBACK_LOCALE=en
APP_FAKER_LOCALE=en_US APP_FAKER_LOCALE=en_US

1
.gitignore vendored
View file

@ -16,6 +16,7 @@ Homestead.json
Homestead.yaml Homestead.yaml
npm-debug.log npm-debug.log
yarn-error.log yarn-error.log
/package-lock.json
/auth.json /auth.json
/.fleet /.fleet
/.idea /.idea

View file

@ -24,6 +24,7 @@ public function casts(): array
{ {
return [ return [
'created_at' => 'datetime', 'created_at' => 'datetime',
'updated_at' => 'datetime',
]; ];
} }

View file

@ -4,7 +4,7 @@
use App\Models\Article; use App\Models\Article;
use Exception; use Exception;
use Illuminate\Database\Eloquent\Collection; use Illuminate\Support\Collection;
use Illuminate\Support\Facades\Http; use Illuminate\Support\Facades\Http;
class ArticleFetcher class ArticleFetcher

View file

@ -12,7 +12,7 @@ public function up(): void
$table->id(); $table->id();
$table->string('url'); $table->string('url');
$table->boolean('is_relevant')->nullable(); $table->boolean('is_relevant')->nullable();
$table->timestamp('created_at')->default(now()); $table->timestamps();
}); });
} }

7326
package-lock.json generated

File diff suppressed because it is too large Load diff