schema_paymentという名前のテーブルがあります。2つの列を持つテーブルからレコードを取得する方法は同じ値ですか?
Schema::create('agent_payment', function (Blueprint $table) {
$table->increments('id');
$table->integer('agent_id');
$table->integer('created_by');
$table->integer('rid')->nullable()->comment('Only For Admin Reservation');
$table->string('date');
$table->string('paid_amount');
$table->string('paid_by')->nullable();
$table->string('received_by')->nullable();
$table->enum('type',['cash','cheque']);
$table->string('bank_name')->nullable();
$table->string('cheque_num')->nullable();
$table->string('deposited_to')->nullable();
$table->string('account_num')->nullable();
$table->string('slip')->nullable();
$table->integer('verified')->default(0)->comment('Verified 1 Unverified 0');
$table->integer('status_change')->default(0);
$table->string('reject_message')->nullable();
$table->timestamps();
});
私はこのテーブルのAgentPaymentのモデルを持っています。
今、2列に同じ値のレコードを取得しようとしています。
は単に私が
status_change = 0のレコードとを必要とする検証= 0
または
status_change = 1と検証= 1
それはのように上記のいずれかを取得するのは簡単です:
$payments = AgentPayment::where('status_change',1)->where('verified',1)->get();
しかし、これらの両方を取得する方法。
偉大な、私の問題の歓声のために働いた –
問題なし、うれしかった – Jonathon