Seed with demo images

This commit is contained in:
snipe
2017-10-28 05:46:43 -07:00
parent 46fb5c9d40
commit 4f1747023a
55 changed files with 199 additions and 20 deletions
@@ -159,6 +159,14 @@ class AssetModelsController extends Controller
return response()->json(Helper::formatStandardApiResponse('error', null, trans('admin/models/message.assoc_users')));
}
if ($assetmodel->image) {
try {
unlink(public_path().'/uploads/models/'.$assetmodel->image);
} catch (\Exception $e) {
\Log::error($e);
}
}
$assetmodel->delete();
return response()->json(Helper::formatStandardApiResponse('success', null, trans('admin/assetmodels/message.delete.success')));