mirror of
https://github.com/snipe/snipe-it.git
synced 2024-11-20 04:24:23 -08:00
21 lines
489 B
PHP
21 lines
489 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Helpers\Helper;
|
|
|
|
class ModalController extends Controller
|
|
{
|
|
function show($type, $itemId = null) {
|
|
$view = view("modals.${type}");
|
|
|
|
if($type == "statuslabel") {
|
|
$view->with('statuslabel_types', Helper::statusTypeList());
|
|
}
|
|
if(in_array($type, ['kit-model', 'kit-license', 'kit-consumable', 'kit-accessory'])) {
|
|
$view->with('kitId', $itemId);
|
|
}
|
|
return $view;
|
|
}
|
|
}
|