“ленивая загрузка Ларавела” Ответ

Где сайт: https: //laravel.com/docs/

use Illuminate\Database\Eloquent\Builder;

// Retrieve posts with at least one comment containing words like code%...
$posts = Post::whereHas('comments', function (Builder $query) {
    $query->where('content', 'like', 'code%');
})->get();

// Retrieve posts with at least ten comments containing words like code%...
$posts = Post::whereHas('comments', function (Builder $query) {
    $query->where('content', 'like', 'code%');
}, '>=', 10)->get();
Tiago F2

ленивая загрузка Ларавела

   $(document).ready(function () {
        $("img.lazy").showLazyLoad();
    });

    var pageLazyLoad = 1;
    $(window).scroll(function () {
        if ($(window).scrollTop() + $(window).height() >= $(document).height() - 100) {
            pageLazyLoad++;
            loadMoreData(pageLazyLoad);
        }
    });

    $.fn.showLazyLoad = function () {
        this.lazyload({
            effect: "fadeIn",
            threshold: 2.05,
        });
    };
Zany Zebra

ленивая нагрузка против нетерпеливой загрузки Ларавель

1. Eager Loading : Eager Loading helps you to load all your needed entities at once.
  i.e. related objects (child objects) are loaded automatically with its parent 
 object. Use Eager Loading when the relations are not too much. Thus, 
Eager Loading is a good practice to reduce further queries on the Server.
Use Eager Loading when you are sure that you will be using related entities with the main entity everywhere.
Lazy Loading: In case of lazy loading, related objects (child objects) are not loaded automatically with its parent object until they are requested. By default LINQ supports lazy loading.


M. Wasim Abbasi

Ответы похожие на “ленивая загрузка Ларавела”

Вопросы похожие на “ленивая загрузка Ларавела”

Больше похожих ответов на “ленивая загрузка Ларавела” по PHP

Смотреть популярные ответы по языку

Смотреть другие языки программирования