InsertUsing - Laravel - Functions Code

PHOTO EMBED

Mon Oct 03 2022 14:47:49 GMT+0000 (Coordinated Universal Time)

Saved by @WMOH

$fillable = new LicenseBilling();
$fillable = $fillable->getFillable();
DB::table('license_billing')->insertUsing(
     $fillable, function ($query) use ($fillable) {
        $query->select($fillable)
            ->from('license_billing_old')
            ->orderBy('license_billing_old.license_billing_id','ASC');
    }
);
content_copyCOPY

https://functionscode.com/laravel-functions/insertusing-59