1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-11 05:32:39 +01:00
invoiceninja/database/factories/CompanyFactory.php
David Bomba 9a19f7fd4c Fixes for invoice update and invoice designs (#3302)
* BaseController cleanup

* Working on invoice designs

* Working on invoice designs

* working on invoice designs

* working on invoice designs

* invoice designs

* Working on Invoice Designs

* Fixes for user settings object

* Working on invoice designs

* Fixes for encoded user settings

* Working on contact localized invoice pdfs

* working on invoice designs

* Fix for invoice update 500 error
2020-02-10 20:53:02 +11:00

26 lines
944 B
PHP

<?php
use App\DataMapper\CompanySettings;
use Faker\Generator as Faker;
$factory->define(App\Models\Company::class, function (Faker $faker) {
return [
//'name' => $faker->name,
'company_key' => strtolower(\Illuminate\Support\Str::random(config('ninja.key_length'))),
'ip' => $faker->ipv4,
'db' => config('database.default'),
'settings' => CompanySettings::defaults(),
'custom_fields' => (object) ['invoice1' => '1', 'invoice2' => '2', 'client1'=>'3'],
// 'address1' => $faker->secondaryAddress,
// 'address2' => $faker->address,
// 'city' => $faker->city,
// 'state' => $faker->state,
// 'postal_code' => $faker->postcode,
// 'country_id' => 4,
// 'phone' => $faker->phoneNumber,
// 'email' => $faker->safeEmail,
// 'logo' => 'https://www.invoiceninja.com/wp-content/themes/invoice-ninja/images/logo.png',
];
});