Browse Source

update model disposal

master
unknown 1 year ago
parent
commit
dd619e4260
  1. 2
      app/Models/Disposal.php
  2. 2
      database/migrations/2023_11_17_075418_create_disposals_table.php

2
app/Models/Disposal.php

@ -9,7 +9,7 @@ use Illuminate\Database\Eloquent\Factories\HasFactory;
class Disposal extends Model class Disposal extends Model
{ {
use HasFactory, SoftDeletes, UUID; use HasFactory, SoftDeletes;
protected $table = 'disposals'; protected $table = 'disposals';
protected $fillable = [ protected $fillable = [

2
database/migrations/2023_11_17_075418_create_disposals_table.php

@ -12,7 +12,7 @@ return new class extends Migration
public function up(): void public function up(): void
{ {
Schema::create('disposals', function (Blueprint $table) { Schema::create('disposals', function (Blueprint $table) {
$table->uuid('id')->primary(); $table->id('id');
$table->uuid('mobile_id')->nullable(); $table->uuid('mobile_id')->nullable();
$table->foreignId('peti_id')->constrained('petis'); $table->foreignId('peti_id')->constrained('petis');
$table->foreignId('customer_id')->nullable()->constrained('customers')->onDelete('set null'); $table->foreignId('customer_id')->nullable()->constrained('customers')->onDelete('set null');

Loading…
Cancel
Save