mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
L5 Updates
This commit is contained in:
parent
a14e1713af
commit
698809fa01
@ -1,13 +1,15 @@
|
||||
<?php namespace App\Http\Controllers;
|
||||
|
||||
use Auth;
|
||||
use Event;
|
||||
use File;
|
||||
use Image;
|
||||
use Input;
|
||||
use Redirect;
|
||||
use Session;
|
||||
use Utils;
|
||||
use View;
|
||||
use Event;
|
||||
use Validator;
|
||||
use View;
|
||||
use stdClass;
|
||||
|
||||
use App\Models\User;
|
||||
@ -303,7 +305,7 @@ class AccountController extends BaseController
|
||||
$account->quote_number_prefix = Input::get('quote_number_prefix');
|
||||
$account->share_counter = Input::get('share_counter') ? true : false;
|
||||
|
||||
//$account->pdf_email_attachment = Input::get('pdf_email_attachment') ? true : false;
|
||||
$account->pdf_email_attachment = Input::get('pdf_email_attachment') ? true : false;
|
||||
|
||||
if (!$account->share_counter) {
|
||||
$account->quote_number_counter = Input::get('quote_number_counter');
|
||||
@ -630,16 +632,15 @@ class AccountController extends BaseController
|
||||
|
||||
$image = Image::make($path);
|
||||
$mimeType = $file->getMimeType();
|
||||
|
||||
if ($image->width == 200 && $mimeType == 'image/jpeg') {
|
||||
|
||||
if ($image->width() == 200 && $mimeType == 'image/jpeg') {
|
||||
$file->move('logo/', $account->account_key . '.jpg');
|
||||
} else {
|
||||
$image->resize(200, 120, true, false);
|
||||
Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath());
|
||||
$image->resize(200, 120, function ($constraint) {
|
||||
$constraint->aspectRatio();
|
||||
});
|
||||
Image::canvas($image->width(), $image->height(), '#FFFFFF')->insert($image)->save($account->getLogoPath());
|
||||
}
|
||||
|
||||
//$image = Image::make($path)->resize(200, 120, true, false);
|
||||
//Image::canvas($image->width, $image->height, '#FFFFFF')->insert($image)->save($account->getLogoPath());
|
||||
}
|
||||
|
||||
Event::fire(new UserSettingsChanged());
|
||||
|
@ -2,19 +2,19 @@
|
||||
|
||||
use Auth;
|
||||
use Config;
|
||||
use Datatable;
|
||||
use DB;
|
||||
use Event;
|
||||
use Input;
|
||||
use View;
|
||||
use Redirect;
|
||||
use Session;
|
||||
use URL;
|
||||
use Utils;
|
||||
use DB;
|
||||
use Datatable;
|
||||
use Validator;
|
||||
|
||||
use App\Models\User;
|
||||
|
||||
use App\Http\Requests;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Ninja\Repositories\AccountRepository;
|
||||
use App\Ninja\Mailers\ContactMailer;
|
||||
use App\Ninja\Mailers\UserMailer;
|
||||
|
@ -61,11 +61,6 @@ class Account extends Eloquent
|
||||
return $this->belongsTo('App\Models\DatetimeFormat');
|
||||
}
|
||||
|
||||
public function currency()
|
||||
{
|
||||
return $this->belongsTo('Currency');
|
||||
}
|
||||
|
||||
public function size()
|
||||
{
|
||||
return $this->belongsTo('App\Models\Size');
|
||||
|
561
composer.lock
generated
561
composer.lock
generated
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user