Completed
Push — master ( bcfc51...2533f4 )
by David
01:24 queued 11s
created

PublishedScope::apply()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 2
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Torralbodavid\DuckFunkCore\Scopes;
4
5
use Carbon\Carbon;
6
use Illuminate\Database\Eloquent\Builder;
7
use Illuminate\Database\Eloquent\Model;
8
use Illuminate\Database\Eloquent\Scope;
9
10
class PublishedScope implements Scope
11
{
12
    public function apply(Builder $builder, Model $model)
13
    {
14
        $builder->where('published_at', '<=', Carbon::now());
15
    }
16
}
17