Laravel Collection 검색 기능을 사용할 때 항상 false를 반환합니다.Laravel Eloquent Collection 검색은 항상 false를 반환합니다.
코드 :
$entries = Entry::all();
$results = $entries->search('Jack', true);
dd($results);
출력 : false
출력 DD ($ 항목) :
무서운 형식에 대한Collection {#218 ▼
#items: array:9 [▼
0 => Entry {#219 ▼
#fillable: array:2 [▶]
#connection: "mysql"
#table: null
#primaryKey: "id"
#keyType: "int"
+incrementing: true
#with: []
#perPage: 15
+exists: true
+wasRecentlyCreated: false
#attributes: array:5 [▶]
#original: array:5 [▶]
#casts: []
#dates: []
#dateFormat: null
#appends: []
#events: []
#observables: []
#relations: []
#touches: []
+timestamps: true
#hidden: []
#visible: []
#guarded: array:1 [▶]
}
1 => Entry {#220 ▶}
2 => Entry {#221 ▶}
3 => Entry {#222 ▶}
4 => Entry {#223 ▶}
5 => Entry {#224 ▶}
6 => Entry {#225 ▶}
7 => Entry {#226 ▶}
8 => Entry {#227 ▶}
]
}
죄송합니다.
는'DD ($ 항목)'와 그 결과를 게시 할 수 있습니까? – Ian