Тэги:
#laravel #learn_laravel_for_beginners #laravel_full_course #laravel_tutorial_youtube #how_to_learn_laravel #complete_laravel_9_course #learn_laravel_9 #complete_laravel #laravel_from_scratch #laravel_code #learn_laravel_code #Complete_Laravel_Tutorial #laravel_tutorial #laravel_9_for_beginners #laravel9 #collection_vs_array_laravel #what_are_collections_array #what_are_collections #what_is_collection_in_laravel #filtering_for_beginners_laravel #filter_data_laravelКомментарии:
what if you have millions and millions users? its better to filter with the query like from an array.
ОтветитьThe filter method of the Collection is useful for filtering the data of a collection. However, in this example, it would be more efficient to filter the users directly in the query :)
ОтветитьThis is a sharpening 🔥 tool
ОтветитьYou should avoid getting all records from the database. It would be better to use where and filter data this way.
Ответитьis not better use a getter on the model and return if the user is admin?
Ответить$&£/$÷^٣&$@&)تبك😐
Ответить