Completed
Push — master ( 71cd39...d95db8 )
by Evan
15s
created

QueryBuilder::newQuery()

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 1
nc 1
1
<?php
2
3
namespace Silk\Query;
4
5
use Silk\Contracts\BuildsQueries;
6
7
trait QueryBuilder
8
{
9
    /**
10
     * Get a new query builder for the model.
11
     *
12
     * @return BuildsQueries
13
     */
14
    abstract public function newQuery();
15
16
    /**
17
     * Create a new query builder instance for this model type.
18
     *
19
     * @return BuildsQueries
20
     */
21
    public static function query()
22
    {
23
        return (new static)->newQuery();
24
    }
25
}
26