mirror of
https://github.com/snipe/snipe-it.git
synced 2025-01-11 05:47:28 -08:00
Fixed groups request
This commit is contained in:
parent
c31e150935
commit
4d38c44a93
|
@ -3,7 +3,7 @@ namespace App\Http\Controllers;
|
||||||
|
|
||||||
use App\Helpers\Helper;
|
use App\Helpers\Helper;
|
||||||
use App\Models\Group;
|
use App\Models\Group;
|
||||||
use Request;
|
use Illuminate\Http\Request;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -37,13 +37,13 @@ class GroupsController extends Controller
|
||||||
* @since [v1.0]
|
* @since [v1.0]
|
||||||
* @return \Illuminate\Contracts\View\View
|
* @return \Illuminate\Contracts\View\View
|
||||||
*/
|
*/
|
||||||
public function create()
|
public function create(Request $request)
|
||||||
{
|
{
|
||||||
$group = new Group;
|
$group = new Group;
|
||||||
// Get all the available permissions
|
// Get all the available permissions
|
||||||
$permissions = config('permissions');
|
$permissions = config('permissions');
|
||||||
$groupPermissions = Helper::selectedPermissionsArray($permissions, $permissions);
|
$groupPermissions = Helper::selectedPermissionsArray($permissions, $permissions);
|
||||||
$selectedPermissions = Request::old('permissions', $groupPermissions);
|
$selectedPermissions = $request->old('permissions', $groupPermissions);
|
||||||
|
|
||||||
// Show the page
|
// Show the page
|
||||||
return view('groups/edit', compact('permissions', 'selectedPermissions', 'groupPermissions'))->with('group', $group);
|
return view('groups/edit', compact('permissions', 'selectedPermissions', 'groupPermissions'))->with('group', $group);
|
||||||
|
|
Loading…
Reference in a new issue