Question: Iam using below xpath:

```
//label[text()='First Name']/Parent::div/following-sibling::div/div/input[@disabled='disabled']

```

But showing an error as:

> 
> SyntaxError: Failed to execute 'evaluate' on 'Document': The string
>  '//label[text()='First
>  Name']/Parent::div/following-sibling::div/div/input[@disabled='disabled']'
>  is not a valid XPath expression.
> 
> 
>

Answer: 
Use the `compact` method as the second argument to `view`:

```
public function showvalues(Request $request)
{
    $name = $request->get('name');
    $address = $request->get('address');
    $pass = $request->get('password');

    return view('showvalues', compact('name', 'address', 'pass'));
}

```

The variables will be available in your view file by the same name, you can display them like:

```
{{ $name }}
{{ $address }}
{{ $pass }}

```
You need to return all `form` inputs with `compact` function.

**Controller**

```
public function showvalues(Request $request)
{
    $form = $request->all();

    return view('showvalues', compact('form'));
}

```

**View**

```
{{ $form['name'] }}
{{ $form['address'] }}

```