update list item and labelcontroller

This commit is contained in:
Fayyazi
2019-11-03 11:51:36 +03:30
parent 6ece7b720d
commit 2306aca310
2 changed files with 17 additions and 4 deletions
+4 -4
View File
@@ -94,10 +94,10 @@ class LabelController extends Controller
if (auth('api')->user()->cant('delete', $Label)) {
return \MessageResponse::error(trans('messages.access_denied'));
}
if(count($Label->packages))
{
$Label->packages()->detach();
}
// if(count($Label->packages))
// {
// $Label->packages()->detach();
// }
if(count($Label->cycles))
{
$Label->cycles()->detach();