first commit
This commit is contained in:
1
database/.gitignore
vendored
Normal file
1
database/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.sqlite*
|
||||
44
database/factories/UserFactory.php
Normal file
44
database/factories/UserFactory.php
Normal file
@@ -0,0 +1,44 @@
|
||||
<?php
|
||||
|
||||
namespace Database\Factories;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\Factory;
|
||||
use Illuminate\Support\Facades\Hash;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
/**
|
||||
* @extends \Illuminate\Database\Eloquent\Factories\Factory<\App\Models\User>
|
||||
*/
|
||||
class UserFactory extends Factory
|
||||
{
|
||||
/**
|
||||
* The current password being used by the factory.
|
||||
*/
|
||||
protected static ?string $password;
|
||||
|
||||
/**
|
||||
* Define the model's default state.
|
||||
*
|
||||
* @return array<string, mixed>
|
||||
*/
|
||||
public function definition(): array
|
||||
{
|
||||
return [
|
||||
'name' => fake()->name(),
|
||||
'email' => fake()->unique()->safeEmail(),
|
||||
'email_verified_at' => now(),
|
||||
'password' => static::$password ??= Hash::make('password'),
|
||||
'remember_token' => Str::random(10),
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Indicate that the model's email address should be unverified.
|
||||
*/
|
||||
public function unverified(): static
|
||||
{
|
||||
return $this->state(fn (array $attributes) => [
|
||||
'email_verified_at' => null,
|
||||
]);
|
||||
}
|
||||
}
|
||||
49
database/migrations/0001_01_01_000000_create_users_table.php
Normal file
49
database/migrations/0001_01_01_000000_create_users_table.php
Normal file
@@ -0,0 +1,49 @@
|
||||
<?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('users', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->unique();
|
||||
$table->timestamp('email_verified_at')->nullable();
|
||||
$table->string('password');
|
||||
$table->rememberToken();
|
||||
$table->timestamps();
|
||||
});
|
||||
|
||||
Schema::create('password_reset_tokens', function (Blueprint $table) {
|
||||
$table->string('email')->primary();
|
||||
$table->string('token');
|
||||
$table->timestamp('created_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('sessions', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->foreignId('user_id')->nullable()->index();
|
||||
$table->string('ip_address', 45)->nullable();
|
||||
$table->text('user_agent')->nullable();
|
||||
$table->longText('payload');
|
||||
$table->integer('last_activity')->index();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('users');
|
||||
Schema::dropIfExists('password_reset_tokens');
|
||||
Schema::dropIfExists('sessions');
|
||||
}
|
||||
};
|
||||
35
database/migrations/0001_01_01_000001_create_cache_table.php
Normal file
35
database/migrations/0001_01_01_000001_create_cache_table.php
Normal file
@@ -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('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
57
database/migrations/0001_01_01_000002_create_jobs_table.php
Normal file
57
database/migrations/0001_01_01_000002_create_jobs_table.php
Normal file
@@ -0,0 +1,57 @@
|
||||
<?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('jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('queue')->index();
|
||||
$table->longText('payload');
|
||||
$table->unsignedTinyInteger('attempts');
|
||||
$table->unsignedInteger('reserved_at')->nullable();
|
||||
$table->unsignedInteger('available_at');
|
||||
$table->unsignedInteger('created_at');
|
||||
});
|
||||
|
||||
Schema::create('job_batches', function (Blueprint $table) {
|
||||
$table->string('id')->primary();
|
||||
$table->string('name');
|
||||
$table->integer('total_jobs');
|
||||
$table->integer('pending_jobs');
|
||||
$table->integer('failed_jobs');
|
||||
$table->longText('failed_job_ids');
|
||||
$table->mediumText('options')->nullable();
|
||||
$table->integer('cancelled_at')->nullable();
|
||||
$table->integer('created_at');
|
||||
$table->integer('finished_at')->nullable();
|
||||
});
|
||||
|
||||
Schema::create('failed_jobs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('uuid')->unique();
|
||||
$table->text('connection');
|
||||
$table->text('queue');
|
||||
$table->longText('payload');
|
||||
$table->longText('exception');
|
||||
$table->timestamp('failed_at')->useCurrent();
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*/
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('jobs');
|
||||
Schema::dropIfExists('job_batches');
|
||||
Schema::dropIfExists('failed_jobs');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
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('owners', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone');
|
||||
$table->string('emirates_id')->nullable();
|
||||
$table->string('passport_no')->nullable();
|
||||
$table->string('nationality')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('owners');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
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('tenants', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->string('name');
|
||||
$table->string('email')->nullable();
|
||||
$table->string('phone');
|
||||
$table->string('emirates_id')->nullable();
|
||||
$table->string('passport_no')->nullable();
|
||||
$table->string('nationality')->nullable();
|
||||
$table->text('address')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('tenants');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
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('buildings', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('owner_id')->constrained('owners')->onDelete('cascade');
|
||||
$table->string('building_name');
|
||||
$table->text('address');
|
||||
$table->string('city');
|
||||
$table->string('status')->default('vacant');
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('buildings');
|
||||
}
|
||||
};
|
||||
29
database/migrations/2026_01_10_000004_create_units_table.php
Normal file
29
database/migrations/2026_01_10_000004_create_units_table.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
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('units', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('building_id')->constrained('buildings')->onDelete('cascade');
|
||||
$table->string('unit_no');
|
||||
$table->string('floor_no')->nullable();
|
||||
$table->integer('area_sqft')->nullable();
|
||||
$table->json('assets')->nullable();
|
||||
$table->string('status')->default('vacant');
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('units');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,28 @@
|
||||
<?php
|
||||
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('subunits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unit_id')->constrained('units')->onDelete('cascade');
|
||||
$table->string('subunit_no');
|
||||
$table->string('subunit_type');
|
||||
$table->integer('area_sqft')->nullable();
|
||||
$table->string('status')->default('vacant');
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('subunits');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,34 @@
|
||||
<?php
|
||||
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('contracts', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('unit_id')->constrained('units')->onDelete('cascade');
|
||||
$table->unsignedBigInteger('person_id');
|
||||
$table->string('contract_type');
|
||||
$table->string('contract_number')->unique();
|
||||
$table->string('ejari_no');
|
||||
$table->date('start_date');
|
||||
$table->date('end_date');
|
||||
$table->integer('duration_months');
|
||||
$table->decimal('total_amount', 15, 2);
|
||||
$table->string('status')->default('active');
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('contracts');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
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('contract_subunits', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('contract_id')->constrained('contracts')->onDelete('cascade');
|
||||
$table->foreignId('subunit_id')->constrained('subunits')->onDelete('cascade');
|
||||
$table->timestamps();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('contract_subunits');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,31 @@
|
||||
<?php
|
||||
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('payments', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('contract_id')->constrained('contracts')->onDelete('cascade');
|
||||
$table->string('payment_type');
|
||||
$table->string('payment_number')->nullable();
|
||||
$table->string('bank_name')->nullable();
|
||||
$table->decimal('amount', 15, 2);
|
||||
$table->date('due_date');
|
||||
$table->string('status')->default('pending');
|
||||
$table->text('notes')->nullable();
|
||||
$table->timestamps();
|
||||
$table->foreignId('created_by')->nullable()->constrained('users');
|
||||
$table->foreignId('updated_by')->nullable()->constrained('users');
|
||||
$table->softDeletes();
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('payments');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
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('activity_logs', function (Blueprint $table) {
|
||||
$table->id();
|
||||
$table->foreignId('user_id')->constrained('users')->onDelete('cascade');
|
||||
$table->string('action');
|
||||
$table->string('model_type');
|
||||
$table->unsignedBigInteger('model_id');
|
||||
$table->json('old_data')->nullable();
|
||||
$table->json('new_data')->nullable();
|
||||
$table->timestamp('created_at');
|
||||
});
|
||||
}
|
||||
|
||||
public function down(): void
|
||||
{
|
||||
Schema::dropIfExists('activity_logs');
|
||||
}
|
||||
};
|
||||
123
database/seeders/DatabaseSeeder.php
Normal file
123
database/seeders/DatabaseSeeder.php
Normal file
@@ -0,0 +1,123 @@
|
||||
<?php
|
||||
// database/seeders/DatabaseSeeder.php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Models\Owner;
|
||||
use App\Models\Tenant;
|
||||
use App\Models\Building;
|
||||
use App\Models\Unit;
|
||||
use App\Models\Subunit;
|
||||
use App\Models\Contract;
|
||||
use App\Models\Payment;
|
||||
use Illuminate\Database\Seeder;
|
||||
use Illuminate\Support\Facades\Auth;
|
||||
|
||||
class DatabaseSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
// Create admin user
|
||||
$admin = User::create([
|
||||
'name' => 'Admin',
|
||||
'email' => 'admin@test.com',
|
||||
'password' => bcrypt('password')
|
||||
]);
|
||||
|
||||
Auth::login($admin);
|
||||
|
||||
// Owners
|
||||
$owner1 = Owner::create(['name' => 'Ahmed Ali', 'email' => 'ahmed@test.com', 'phone' => '0501234567', 'emirates_id' => '784-1234-1234567-1', 'nationality' => 'UAE', 'address' => 'Dubai Marina']);
|
||||
$owner2 = Owner::create(['name' => 'Fatima Hassan', 'email' => 'fatima@test.com', 'phone' => '0507654321', 'emirates_id' => '784-5678-7654321-2', 'nationality' => 'UAE', 'address' => 'JBR']);
|
||||
|
||||
// Tenants
|
||||
$tenant1 = Tenant::create(['name' => 'John Smith', 'email' => 'john@test.com', 'phone' => '0509876543', 'passport_no' => 'US123456', 'nationality' => 'USA', 'address' => 'Business Bay']);
|
||||
$tenant2 = Tenant::create(['name' => 'Maria Garcia', 'email' => 'maria@test.com', 'phone' => '0503456789', 'passport_no' => 'ES987654', 'nationality' => 'Spain', 'address' => 'Downtown Dubai']);
|
||||
|
||||
// Buildings
|
||||
$building1 = Building::create(['owner_id' => $owner1->id, 'building_name' => 'Marina Heights', 'address' => 'Marina Walk', 'city' => 'Dubai', 'status' => 'occupied']);
|
||||
$building2 = Building::create(['owner_id' => $owner2->id, 'building_name' => 'Sky Tower', 'address' => 'Sheikh Zayed Road', 'city' => 'Dubai', 'status' => 'occupied']);
|
||||
|
||||
// Units
|
||||
$unit1 = Unit::create(['building_id' => $building1->id, 'unit_no' => '1205', 'floor_no' => '12', 'area_sqft' => 1200, 'assets' => ['AC', 'Fridge', 'Washing Machine'], 'status' => 'occupied']);
|
||||
$unit2 = Unit::create(['building_id' => $building1->id, 'unit_no' => '805', 'floor_no' => '8', 'area_sqft' => 800, 'assets' => ['AC'], 'status' => 'occupied']);
|
||||
$unit3 = Unit::create(['building_id' => $building2->id, 'unit_no' => '305', 'floor_no' => '3', 'area_sqft' => 1500, 'assets' => ['AC', 'Fridge', 'Bed'], 'status' => 'vacant']);
|
||||
|
||||
// Subunits
|
||||
$sub1 = Subunit::create(['unit_id' => $unit1->id, 'subunit_no' => 'R1', 'subunit_type' => 'room', 'area_sqft' => 400, 'status' => 'occupied']);
|
||||
$sub2 = Subunit::create(['unit_id' => $unit1->id, 'subunit_no' => 'R2', 'subunit_type' => 'room', 'area_sqft' => 350, 'status' => 'vacant']);
|
||||
$sub3 = Subunit::create(['unit_id' => $unit2->id, 'subunit_no' => 'R1', 'subunit_type' => 'room', 'area_sqft' => 400, 'status' => 'occupied']);
|
||||
|
||||
// Owner Contracts
|
||||
$ownerContract1 = Contract::create([
|
||||
'unit_id' => $unit1->id,
|
||||
'person_id' => $owner1->id,
|
||||
'contract_type' => 'owner',
|
||||
'contract_number' => 'OC-2024-001',
|
||||
'ejari_no' => 'EJ-001-2024',
|
||||
'start_date' => '2024-01-01',
|
||||
'end_date' => '2025-01-01',
|
||||
'duration_months' => 12,
|
||||
'total_amount' => 120000,
|
||||
'status' => 'active',
|
||||
'notes' => 'Annual maintenance included'
|
||||
]);
|
||||
|
||||
$ownerContract2 = Contract::create([
|
||||
'unit_id' => $unit2->id,
|
||||
'person_id' => $owner1->id,
|
||||
'contract_type' => 'owner',
|
||||
'contract_number' => 'OC-2024-002',
|
||||
'ejari_no' => 'EJ-002-2024',
|
||||
'start_date' => '2024-03-01',
|
||||
'end_date' => '2025-03-01',
|
||||
'duration_months' => 12,
|
||||
'total_amount' => 80000,
|
||||
'status' => 'active'
|
||||
]);
|
||||
|
||||
// Tenant Contracts
|
||||
$tenantContract1 = Contract::create([
|
||||
'unit_id' => $unit1->id,
|
||||
'person_id' => $tenant1->id,
|
||||
'contract_type' => 'tenant',
|
||||
'contract_number' => 'TC-2024-001',
|
||||
'ejari_no' => 'EJ-T001-2024',
|
||||
'start_date' => '2024-01-15',
|
||||
'end_date' => '2025-01-15',
|
||||
'duration_months' => 12,
|
||||
'total_amount' => 95000,
|
||||
'status' => 'active',
|
||||
'notes' => 'Includes parking'
|
||||
]);
|
||||
$tenantContract1->subunits()->attach($sub1->id);
|
||||
|
||||
$tenantContract2 = Contract::create([
|
||||
'unit_id' => $unit2->id,
|
||||
'person_id' => $tenant2->id,
|
||||
'contract_type' => 'tenant',
|
||||
'contract_number' => 'TC-2024-002',
|
||||
'ejari_no' => 'EJ-T002-2024',
|
||||
'start_date' => '2024-02-01',
|
||||
'end_date' => '2025-02-01',
|
||||
'duration_months' => 12,
|
||||
'total_amount' => 65000,
|
||||
'status' => 'active'
|
||||
]);
|
||||
$tenantContract2->subunits()->attach($sub3->id);
|
||||
|
||||
// Payments for contracts
|
||||
Payment::create(['contract_id' => $ownerContract1->id, 'payment_type' => 'cheque', 'payment_number' => 'CHQ-001', 'bank_name' => 'Emirates NBD', 'amount' => 30000, 'due_date' => '2024-01-01', 'status' => 'cleared']);
|
||||
Payment::create(['contract_id' => $ownerContract1->id, 'payment_type' => 'cheque', 'payment_number' => 'CHQ-002', 'bank_name' => 'Emirates NBD', 'amount' => 30000, 'due_date' => '2024-04-01', 'status' => 'cleared']);
|
||||
Payment::create(['contract_id' => $ownerContract1->id, 'payment_type' => 'online', 'amount' => 30000, 'due_date' => '2024-07-01', 'status' => 'collected']);
|
||||
Payment::create(['contract_id' => $ownerContract1->id, 'payment_type' => 'cash', 'amount' => 30000, 'due_date' => '2024-10-01', 'status' => 'pending']);
|
||||
|
||||
Payment::create(['contract_id' => $tenantContract1->id, 'payment_type' => 'cheque', 'payment_number' => 'CHQ-101', 'bank_name' => 'ADCB', 'amount' => 47500, 'due_date' => '2024-01-15', 'status' => 'cleared']);
|
||||
Payment::create(['contract_id' => $tenantContract1->id, 'payment_type' => 'cheque', 'payment_number' => 'CHQ-102', 'bank_name' => 'ADCB', 'amount' => 47500, 'due_date' => '2024-07-15', 'status' => 'pending']);
|
||||
|
||||
Payment::create(['contract_id' => $tenantContract2->id, 'payment_type' => 'online', 'amount' => 65000, 'due_date' => '2024-02-01', 'status' => 'cleared']);
|
||||
|
||||
Auth::logout();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user