App\Http\Controllers\Laralum\RolesController::edit PHP Method

edit() public method

public edit ( $id )
    public function edit($id)
    {
        Laralum::permissionToAccess('laralum.roles.access');
        # Check permissions
        Laralum::permissionToAccess('laralum.roles.edit');
        # Find the role
        $row = Role::findOrFail($id);
        if (!$row->allow_editing and !Laralum::loggedInuser()->su) {
            abort(403, trans('laralum.error_editing_disabled'));
        }
        # Get all the data
        $data_index = 'roles';
        require 'Data/Edit/Get.php';
        # Return the view
        return view('laralum/roles/edit', ['row' => $row, 'fields' => $fields, 'confirmed' => $confirmed, 'empty' => $empty, 'encrypted' => $encrypted, 'hashed' => $hashed, 'masked' => $masked, 'table' => $table, 'code' => $code, 'wysiwyg' => $wysiwyg, 'relations' => $relations]);
    }