dealhub/database/migrations/2026_02_05_085807_create_follows_table.php
kusowl 5cae04884a feature(users can follow a broker)
- add schema and endpoints to make follows relationship with customer
and broker

- show and update states of follow button on ui
2026-02-05 18:19:52 +05:30

26 lines
589 B
PHP

<?php
use App\Models\Broker;
use App\Models\Customer;
use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;
return new class extends Migration
{
public function up(): void
{
Schema::create('follows', function (Blueprint $table) {
$table->id();
$table->foreignIdFor(Customer::class);
$table->foreignIdFor(Broker::class);
$table->timestamps();
});
}
public function down(): void
{
Schema::dropIfExists('follows');
}
};