2017-08-24 22:24:02 -07:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
|
|
|
|
use App\Helpers\Helper;
|
|
|
|
|
|
|
|
class ModalController extends Controller
|
|
|
|
{
|
2021-06-10 13:15:52 -07:00
|
|
|
public function show($type, $itemId = null)
|
|
|
|
{
|
2020-05-23 09:19:19 -07:00
|
|
|
$view = view("modals.${type}");
|
|
|
|
|
2021-06-10 13:15:52 -07:00
|
|
|
if ($type == 'statuslabel') {
|
2020-05-23 09:19:19 -07:00
|
|
|
$view->with('statuslabel_types', Helper::statusTypeList());
|
|
|
|
}
|
2021-06-10 13:15:52 -07:00
|
|
|
if (in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) {
|
2020-05-23 09:19:19 -07:00
|
|
|
$view->with('kitId', $itemId);
|
|
|
|
}
|
2021-06-10 13:15:52 -07:00
|
|
|
|
2020-05-23 09:19:19 -07:00
|
|
|
return $view;
|
2019-02-19 11:19:00 -08:00
|
|
|
}
|
2017-08-24 22:24:02 -07:00
|
|
|
}
|