%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /var/www/html/news/vendor/czim/laravel-repository/src/Criteria/Common/
Upload File :
Create Path :
Current File : /var/www/html/news/vendor/czim/laravel-repository/src/Criteria/Common/WithRelations.php

<?php
namespace Czim\Repository\Criteria\Common;

use Czim\Repository\Criteria\AbstractCriteria;
use Illuminate\Database\Eloquent\Builder;

class WithRelations extends AbstractCriteria
{
    /**
     * @var array
     */
    protected $withStatements = [];

    /**
     * @param array $withStatements
     */
    public function __construct(array $withStatements)
    {
        $this->withStatements = $withStatements;
    }


    /**
     * @param Builder $model
     * @return mixed
     */
    public function applyToQuery($model)
    {
        return $model->with($this->withStatements);
    }

}

Zerion Mini Shell 1.0