mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-25 05:34:06 -08:00
Licenses detail view
This commit is contained in:
parent
708385e23a
commit
0c43e64160
|
@ -117,7 +117,13 @@ class LicensesController extends Controller
|
||||||
*/
|
*/
|
||||||
public function show($id)
|
public function show($id)
|
||||||
{
|
{
|
||||||
//
|
$license = License::find($id);
|
||||||
|
if (isset($license->id)) {
|
||||||
|
$license = $license->load('assignedusers', 'licenseSeats.user', 'licenseSeats.asset');
|
||||||
|
$this->authorize('view', $license);
|
||||||
|
return (new LicensesTransformer)->transformLicense($license);
|
||||||
|
}
|
||||||
|
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/licenses/message.does_not_exist')), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue