in Controller

```
public function index(Request $request)
    {
        $search_cons = $request->all();
        $search_con = $search_cons->name;  //error place
        return $search_cons.$search_con;
    }

```

`->name` this place has the error 

Trying to get property of non-object

Or in blade.view

```
<p>{{$search_cons->name}}</p>   has the error

```

Trying to get property of non-object

But if I use

```
$search_cons=$request->input('name');

```

on controller

the blade view
`<p>{{$search_cons}}</p>` will work ok!

I want the `$search=request->all()` so I can freely use `$search->name` on my blade view
How can I fix the question?
PS: I tried `$resquest('name')` still not to work
`Request::all()` ->tell me the