mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for company logo output
This commit is contained in:
parent
23265fb9e3
commit
9afcc28549
@ -33,6 +33,8 @@ class UpdateCompanyRequest extends Request
|
|||||||
|
|
||||||
public function rules()
|
public function rules()
|
||||||
{
|
{
|
||||||
|
\Log::error($this->all());
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'logo' => 'mimes:jpeg,jpg,png,gif|max:10000', // max 10000kb
|
'logo' => 'mimes:jpeg,jpg,png,gif|max:10000', // max 10000kb
|
||||||
'industry_id' => 'integer|nullable',
|
'industry_id' => 'integer|nullable',
|
||||||
|
@ -186,6 +186,11 @@ class Company extends BaseModel
|
|||||||
return isset($this->settings->language_id) && $this->language() ? $this->language()->locale : config('ninja.i18n.locale');
|
return isset($this->settings->language_id) && $this->language() ? $this->language()->locale : config('ninja.i18n.locale');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function getLogo()
|
||||||
|
{
|
||||||
|
return $this->logo ? config('ninja.site_url').$this->logo : '';
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
|
||||||
*/
|
*/
|
||||||
|
@ -66,7 +66,7 @@ class CompanyTransformer extends EntityTransformer
|
|||||||
return [
|
return [
|
||||||
'id' => $this->encodePrimaryKey($company->id),
|
'id' => $this->encodePrimaryKey($company->id),
|
||||||
'name' => $company->name ?: '',
|
'name' => $company->name ?: '',
|
||||||
'logo' => $company->logo ?: '',
|
'logo' => $company->getLogo(),
|
||||||
'company_key' => $company->company_key ?: '',
|
'company_key' => $company->company_key ?: '',
|
||||||
'address1' => $company->address1 ?: '',
|
'address1' => $company->address1 ?: '',
|
||||||
'address2' => $company->address2 ?: '',
|
'address2' => $company->address2 ?: '',
|
||||||
|
@ -84,7 +84,9 @@ class UploadLogoTest extends TestCase
|
|||||||
|
|
||||||
$response->assertStatus(302);
|
$response->assertStatus(302);
|
||||||
|
|
||||||
//Log::error(print_r($response->json(),1));
|
//$acc = $response->json();
|
||||||
|
|
||||||
|
//\Log::error(print_r($acc,1));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user