mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-05-24 02:14:21 -04:00
Fixes for transformers
This commit is contained in:
parent
9afcc28549
commit
3b6fa39d43
@ -15,7 +15,6 @@ use App\Models\CompanyGateway;
|
||||
|
||||
class CompanyGatewayFactory
|
||||
{
|
||||
use MakesHash;
|
||||
|
||||
public static function create(int $company_id, int $user_id) :CompanyGateway
|
||||
{
|
||||
@ -23,7 +22,7 @@ class CompanyGatewayFactory
|
||||
$company_gateway = new CompanyGateway;
|
||||
$company_gateway->company_id = $company_id;
|
||||
$company_gateway->user_id = $user_id;
|
||||
|
||||
|
||||
return $company_gateway;
|
||||
|
||||
}
|
||||
|
@ -33,7 +33,6 @@ class UpdateCompanyRequest extends Request
|
||||
|
||||
public function rules()
|
||||
{
|
||||
\Log::error($this->all());
|
||||
|
||||
return [
|
||||
'logo' => 'mimes:jpeg,jpg,png,gif|max:10000', // max 10000kb
|
||||
|
@ -64,25 +64,25 @@ class CompanyTransformer extends EntityTransformer
|
||||
public function transform(Company $company)
|
||||
{
|
||||
return [
|
||||
'id' => $this->encodePrimaryKey($company->id),
|
||||
'name' => $company->name ?: '',
|
||||
'logo' => $company->getLogo(),
|
||||
'company_key' => $company->company_key ?: '',
|
||||
'address1' => $company->address1 ?: '',
|
||||
'address2' => $company->address2 ?: '',
|
||||
'city' => $company->city ?: '',
|
||||
'state' => $company->state ?: '',
|
||||
'postal_code' => $company->postal_code ?: '',
|
||||
'work_phone' => $company->work_phone ?: '',
|
||||
'work_email' => $company->work_email ?: '',
|
||||
'id' => (string)$this->encodePrimaryKey($company->id),
|
||||
'name' => (string)$company->name ?: '',
|
||||
'logo_url' => (string)$company->getLogo(),
|
||||
'company_key' => (string)$company->company_key ?: '',
|
||||
'address1' => (string)$company->address1 ?: '',
|
||||
'address2' => (string)$company->address2 ?: '',
|
||||
'city' => (string)$company->city ?: '',
|
||||
'state' => (string)$company->state ?: '',
|
||||
'postal_code' => (string)$company->postal_code ?: '',
|
||||
'work_phone' => (string)$company->work_phone ?: '',
|
||||
'work_email' => (string)$company->work_email ?: '',
|
||||
'country_id' => (string) $company->country_id ?: '',
|
||||
'vat_number' => $company->vat_number ?: '',
|
||||
'id_number' => $company->id_number ?: '',
|
||||
'vat_number' => (string)$company->vat_number ?: '',
|
||||
'id_number' => (string)$company->id_number ?: '',
|
||||
'size_id' => (string) $company->size_id ?: '',
|
||||
'industry_id' => (string) $company->industry_id ?: '',
|
||||
'settings' => $company->settings ?: '',
|
||||
'updated_at' => $company->updated_at,
|
||||
'deleted_at' => $company->deleted_at,
|
||||
'updated_at' => (int)$company->updated_at,
|
||||
'deleted_at' => (int)$company->deleted_at,
|
||||
];
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user