Small changes

Copy icon if missing on new app add.
Change order of create symlink and load apps
This commit is contained in:
Kode
2018-11-09 23:07:01 +00:00
parent 98c6093674
commit ab83c3a551
4 changed files with 18 additions and 10 deletions

View File

@@ -13,6 +13,14 @@ class Application extends Model
//
public function icon()
{
if(!file_exists(storage_path('app/public/'.$this->icon))) {
$img_src = app_path('SupportedApps/'.$this->name.'/'.str_replace('icons/', '', $this->icon));
$img_dest = storage_path('app/public/'.$this->icon);
//die("i: ".$img_src);
@copy($img_src, $img_dest);
}
return $this->icon;
}