Skip to content

Commit

Permalink
add model and migration event
Browse files Browse the repository at this point in the history
  • Loading branch information
maulayyacyber committed Oct 2, 2024
1 parent 60cb16d commit 68356d6
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 0 deletions.
11 changes: 11 additions & 0 deletions app/Models/Event.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Event extends Model
{
use HasFactory;
}
27 changes: 27 additions & 0 deletions database/migrations/2024_10_02_071842_create_events_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
<?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('events', function (Blueprint $table) {
$table->id();
$table->timestamps();
});
}

/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('events');
}
};

0 comments on commit 68356d6

Please sign in to comment.