Add Zelle Payment Type

This commit is contained in:
David Bomba 2021-08-06 10:49:51 +10:00
parent 722bf40bf8
commit d7009f5072

View File

@ -4,6 +4,7 @@ use App\Models\PaymentType;
use Illuminate\Database\Migrations\Migration; use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint; use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema; use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Eloquent\Model;
class AddZellePaymentType extends Migration class AddZellePaymentType extends Migration
{ {
@ -14,11 +15,14 @@ class AddZellePaymentType extends Migration
*/ */
public function up() public function up()
{ {
Model::unguard();
$pt = PaymentType::where('name', 'Zelle')->first(); $pt = PaymentType::where('name', 'Zelle')->first();
if(!$pt){ if(!$pt){
$payment_type = new PaymentType(); $payment_type = new PaymentType();
$payment_type->id = 33;
$payment_type->name = 'Zelle'; $payment_type->name = 'Zelle';
$payment_type->save(); $payment_type->save();
} }