mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 13:12:50 +01:00
19080933b6
Shift automatically applies the Laravel coding style - which uses the PSR-2 coding style as a base with some minor additions. You may customize the code style applied by adding a [PHP CS Fixer][1] or [PHP CodeSniffer][2] ruleset to your project root. Feel free to use [Shift's Laravel ruleset][3] to help you get started. For more information on customizing the code style applied by Shift, [watch this short video][4]. [1]: https://github.com/FriendsOfPHP/PHP-CS-Fixer [2]: https://github.com/squizlabs/PHP_CodeSniffer [3]: https://gist.github.com/laravel-shift/cab527923ed2a109dda047b97d53c200 [4]: https://laravelshift.com/videos/shift-code-style
31 lines
834 B
PHP
31 lines
834 B
PHP
<?php
|
|
|
|
namespace App\Factory;
|
|
|
|
use App\Models\PurchaseOrderInvitation;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Support\Str;
|
|
|
|
class PurchaseOrderInvitationFactory
|
|
{
|
|
public static function create(int $company_id, int $user_id) :PurchaseOrderInvitation
|
|
{
|
|
$ci = new PurchaseOrderInvitation();
|
|
$ci->company_id = $company_id;
|
|
$ci->user_id = $user_id;
|
|
$ci->vendor_contact_id = null;
|
|
$ci->purchase_order_id = null;
|
|
$ci->key = Str::random(config('ninja.key_length'));
|
|
$ci->transaction_reference = null;
|
|
$ci->message_id = null;
|
|
$ci->email_error = '';
|
|
$ci->signature_base64 = '';
|
|
$ci->signature_date = null;
|
|
$ci->sent_date = null;
|
|
$ci->viewed_date = null;
|
|
$ci->opened_date = null;
|
|
|
|
return $ci;
|
|
}
|
|
}
|