diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php
index 7b086e49..b756c5f9 100644
--- a/app/Http/Controllers/ItemController.php
+++ b/app/Http/Controllers/ItemController.php
@@ -4,6 +4,8 @@ namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Item;
+//use App\SupportedApps\Contracts\Applications;
+use App\SupportedApps\Nzbget;
class ItemController extends Controller
{
@@ -18,6 +20,7 @@ class ItemController extends Controller
$data['apps'] = Item::all();
return view('welcome', $data);
}
+
/**
* Display a listing of the resource.
diff --git a/app/Item.php b/app/Item.php
index eda6d7ba..fdfe0f50 100644
--- a/app/Item.php
+++ b/app/Item.php
@@ -3,6 +3,9 @@
namespace App;
use Illuminate\Database\Eloquent\Model;
+use Symfony\Component\ClassLoader\ClassMapGenerator;
+
+
class Item extends Model
{
@@ -10,4 +13,16 @@ class Item extends Model
protected $fillable = [
'title', 'url', 'colour', 'icon', 'description', 'pinned'
];
+
+ public static function supportedList()
+ {
+ return [
+ 'NZBGet' => App\SupportedApps\Nzbget::class,
+ 'Plex' => App\SupportedApps\Plex::class,
+ ];
+ }
+ public static function supportedOptions()
+ {
+ return array_keys(self::supportedList());
+ }
}
diff --git a/app/SupportedApps/Contracts/Applications.php b/app/SupportedApps/Contracts/Applications.php
new file mode 100644
index 00000000..31fe5e58
--- /dev/null
+++ b/app/SupportedApps/Contracts/Applications.php
@@ -0,0 +1,7 @@
+
{!! csrf_field() !!}
+
+
+ {!! Form::select('supported', \App\Item::supportedOptions(), array('placeholder' => 'Title','class' => 'form-control')) !!}
+
+
{!! Form::text('title', null, array('placeholder' => 'Title','class' => 'form-control')) !!}
diff --git a/vendor/composer/autoload_classmap.php b/vendor/composer/autoload_classmap.php
index c8f528f2..04ac306c 100644
--- a/vendor/composer/autoload_classmap.php
+++ b/vendor/composer/autoload_classmap.php
@@ -26,6 +26,10 @@ return array(
'App\\Providers\\BroadcastServiceProvider' => $baseDir . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => $baseDir . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => $baseDir . '/app/Providers/RouteServiceProvider.php',
+ 'App\\Providers\\SupportedServiceProvider' => $baseDir . '/app/Providers/SupportedServiceProvider.php',
+ 'App\\SupportedApps\\Contracts\\Applications' => $baseDir . '/app/SupportedApps/Contracts/Applications.php',
+ 'App\\SupportedApps\\Nzbget' => $baseDir . '/app/SupportedApps/Nzbget.php',
+ 'App\\SupportedApps\\Plex' => $baseDir . '/app/SupportedApps/Plex.php',
'App\\User' => $baseDir . '/app/User.php',
'ArithmeticError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => $vendorDir . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',
diff --git a/vendor/composer/autoload_static.php b/vendor/composer/autoload_static.php
index 295522d6..d1aeccc2 100644
--- a/vendor/composer/autoload_static.php
+++ b/vendor/composer/autoload_static.php
@@ -337,6 +337,10 @@ class ComposerStaticInit4b6fb9210a1ea37c2db27b8ff53a1ecf
'App\\Providers\\BroadcastServiceProvider' => __DIR__ . '/../..' . '/app/Providers/BroadcastServiceProvider.php',
'App\\Providers\\EventServiceProvider' => __DIR__ . '/../..' . '/app/Providers/EventServiceProvider.php',
'App\\Providers\\RouteServiceProvider' => __DIR__ . '/../..' . '/app/Providers/RouteServiceProvider.php',
+ 'App\\Providers\\SupportedServiceProvider' => __DIR__ . '/../..' . '/app/Providers/SupportedServiceProvider.php',
+ 'App\\SupportedApps\\Contracts\\Applications' => __DIR__ . '/../..' . '/app/SupportedApps/Contracts/Applications.php',
+ 'App\\SupportedApps\\Nzbget' => __DIR__ . '/../..' . '/app/SupportedApps/Nzbget.php',
+ 'App\\SupportedApps\\Plex' => __DIR__ . '/../..' . '/app/SupportedApps/Plex.php',
'App\\User' => __DIR__ . '/../..' . '/app/User.php',
'ArithmeticError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/ArithmeticError.php',
'AssertionError' => __DIR__ . '/..' . '/symfony/polyfill-php70/Resources/stubs/AssertionError.php',