mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-10 05:02:36 +01:00
Working on Client Uploads
This commit is contained in:
parent
5ea1ac6fd2
commit
37e8f41bff
@ -61,9 +61,11 @@ class DocumentController extends Controller
|
|||||||
Log::error($path);
|
Log::error($path);
|
||||||
Log::error($url);
|
Log::error($url);
|
||||||
|
|
||||||
tap((auth()->user())->update([
|
$contact = auth()->user();
|
||||||
|
|
||||||
|
tap($contact)->update([
|
||||||
'avatar' => $url,
|
'avatar' => $url,
|
||||||
]));
|
]);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
[2019-08-07 05:50:23] local.ERROR: array (
|
[2019-08-07 05:50:23] local.ERROR: array (
|
||||||
|
@ -22,6 +22,7 @@ use Illuminate\Database\Eloquent\SoftDeletes;
|
|||||||
use Illuminate\Foundation\Auth\User as Authenticatable;
|
use Illuminate\Foundation\Auth\User as Authenticatable;
|
||||||
use Illuminate\Notifications\Notifiable;
|
use Illuminate\Notifications\Notifiable;
|
||||||
use Laracasts\Presenter\PresentableTrait;
|
use Laracasts\Presenter\PresentableTrait;
|
||||||
|
use Illuminate\Support\Facades\Log;
|
||||||
|
|
||||||
|
|
||||||
class ClientContact extends Authenticatable
|
class ClientContact extends Authenticatable
|
||||||
@ -80,12 +81,14 @@ class ClientContact extends Authenticatable
|
|||||||
return $this->encodePrimaryKey($this->id);
|
return $this->encodePrimaryKey($this->id);
|
||||||
}
|
}
|
||||||
|
|
||||||
public function setAvatarAttribute()
|
public function setAvatarAttribute($value)
|
||||||
{
|
{
|
||||||
if(!filter_var($this->attributes['avatar'], FILTER_VALIDATE_URL))
|
|
||||||
return url('/') . $this->attributes['avatar'];
|
if(!filter_var($value, FILTER_VALIDATE_URL))
|
||||||
|
$this->attributes['avatar'] = url('/') . $value;
|
||||||
else
|
else
|
||||||
return $this->attributes['avatar'];
|
$this->attributes['avatar'] = $value;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public function client()
|
public function client()
|
||||||
|
2
storage/app/public/.gitignore
vendored
2
storage/app/public/.gitignore
vendored
@ -1,2 +0,0 @@
|
|||||||
*
|
|
||||||
!.gitignore
|
|
Loading…
Reference in New Issue
Block a user