change edit func of package & pack & cycle

This commit is contained in:
Fayyazi
2019-09-18 12:35:06 +04:30
parent b2b252752a
commit a5c46e74cd
3 changed files with 9 additions and 3 deletions
+3 -1
View File
@@ -61,7 +61,9 @@ class PackController extends Controller
}
public function edit(Pack $Pack)
{
$Pack->load('user', 'packages');
$Packages = $Pack->packages->pluck('id')->toArray();
unset($Pack->packages);
$Pack->packages = $Packages;
return \MessageResponse::data($Pack);
}