Add Customer resource to Filament admin panel: Implemented Customer model, resource, and associated pages (create, edit, list). Defined customer form schema and table configuration. Added migration for customers table.

This commit is contained in:
Ümit Tunç
2025-09-27 13:24:45 -03:00
parent 394fae1e79
commit 9dbc99200b
8 changed files with 257 additions and 0 deletions
@@ -0,0 +1,35 @@
<?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('customers', function (Blueprint $table) {
$table->id();
$table->string('name');
$table->string('email')->unique();
$table->string('phone')->nullable();
$table->text('address')->nullable();
$table->string('city')->nullable();
$table->string('country')->nullable();
$table->enum('status', ['active', 'inactive', 'pending'])->default('active');
$table->text('notes')->nullable();
$table->timestamps();
});
}
/**
* Reverse the migrations.
*/
public function down(): void
{
Schema::dropIfExists('customers');
}
};