Question: This is my object

```
{
   "id":1,
   "name":"abc",
   "tech":"PHP"
}

```

now i want to get value of tech using User eloquent model using laravel collection method first
this is my eloquent model query

```
$tech = User::select('tech')->first();

```

but it return data is form of object like this

```
{"tech":"PHP"}

```

i want only value in string formate not in object like it should return "PHP".
can any one help?

Answer: 
You can use the [`pluck`](https://laravel.com/api/5.7/Illuminate/Database/Eloquent/Builder.html#method_pluck) function for this.

```
$tech = User::pluck('tech')->first();

```

This will return:

```
"php"

```
Your code 

```
$tech = User::select('tech')->first();

```

as you said 

> 
> Actually it will returns the object 
> 
> 
> 

```
{"tech":"PHP"}

```

try this to get the result the

```
$tech = User::select('tech')->first()->tech;

```

not as

```
$tech = User::select('tech')->first();

```