Laravel 5.3 - Call to undefined method Illuminate\Database\Query\Builder::lists()

Laravel 5.3 - Call to undefined method Illuminate\Database\Query\Builder::lists()

In this post, i will tell you how to resolve error "Call to undefined method Illuminate\Database\Query\Builder::lists()" in Laravel 5.3.

I suggest you to see the Deprecations lists on Laravel's official website before going with Laravel 5.3 because some of feature were deprecated in 5.2 but now it is removed in 5.3

I also found this issue with lists() method in Laravel 5.3 while i was showing categories in select dropdown field.

Error you will get when you use lists() method :

BadMethodCallException in Builder.php line 2437:
Call to undefined method Illuminate\Database\Query\Builder::lists()

lists method on the collection in Laravel 5.3 has been renamed to pluck.

Using Eloquent :
  1. $list=Category::pluck('name','id');
Using DB Query Builder :
  1. $list = \DB::table("categories")->pluck("name","id");

Phone: (+91) 8800417876
Noida, 201301
ataşehir escort maltepe escort bostancı escort kadıköy escort maltepe escort ataşehir escort tuzla escort pendik escort ümraniye escort kartal escort
pendik escort
izmir escort izmir escort izmir escort izmir escort denizli escort antalya escort antalya escort antalya escort izmir escort izmir escort izmir escort izmir escort izmir escort
hatay escort nevsehir escort nigde escort kirikkale escort batman escort osmaniye escort kirklareli escort tokat escort rize escort adiyaman escort gumushane escort batman escort
porno izle
sohbet okey oyna
cialis satış cialis fiyat cialis 20 mg cialis 100 mg cialis 5 mg fiyat

viagra fiyatı

viagra 100 mg fiyat

viagra sipariş

orjinal viagra

viagra satın al

izmir escort