More work on apps

This commit is contained in:
Kode
2022-03-16 18:35:40 +00:00
parent f5bce95808
commit becbe5ab96
15 changed files with 689 additions and 22 deletions

View File

@@ -250,7 +250,9 @@ class ItemController extends Controller
$item = Item::find($id);
if($item->appid === null && $item->class !== null) { // old apps wont have an app id so set it
$app = Application::where('class', $item->class)->first();
$item->appid = $app->appid;
if($app) {
$item->appid = $app->appid;
}
}
$data['item'] = $item;
$data['tags'] = Item::ofType('tag')->orderBy('title', 'asc')->pluck('title', 'id');

View File

@@ -30,7 +30,7 @@ class Item extends Model
//
protected $fillable = [
'title', 'url', 'colour', 'icon', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'appid'
'title', 'url', 'colour', 'icon', 'appdescription', 'description', 'pinned', 'order', 'type', 'class', 'user_id', 'appid'
];
/**

View File

@@ -153,7 +153,7 @@ abstract class SupportedApps
$app->icon = 'icons/'.$details->icon;
$app->website = $details->website;
$app->license = $details->license;
$app->description = $details->description;
$app->appdescription = $details->description;
$appclass = $app->class();
$application = new $appclass;