1 | <?php namespace Cviebrock\EloquentSluggable; |
||
12 | trait Sluggable |
||
13 | { |
||
14 | |||
15 | /** |
||
16 | * Hook into the Eloquent model events to create or |
||
17 | * update the slug as required. |
||
18 | */ |
||
19 | public static function bootSluggable() |
||
23 | |||
24 | /** |
||
25 | * Register a slugging model event with the dispatcher. |
||
26 | * |
||
27 | * @param \Closure|string $callback |
||
28 | * @return void |
||
29 | */ |
||
30 | public static function slugging($callback) |
||
34 | |||
35 | /** |
||
36 | * Register a slugged model event with the dispatcher. |
||
37 | * |
||
38 | * @param \Closure|string $callback |
||
39 | * @return void |
||
40 | */ |
||
41 | public static function slugged($callback) |
||
45 | |||
46 | /** |
||
47 | * Clone the model into a new, non-existing instance. |
||
48 | * |
||
49 | * @param array|null $except |
||
50 | * @return Model |
||
51 | */ |
||
52 | public function replicate(array $except = null) |
||
59 | |||
60 | /** |
||
61 | * Query scope for finding "similar" slugs, used to determine uniqueness. |
||
62 | * |
||
63 | * @param \Illuminate\Database\Eloquent\Builder $query |
||
64 | * @param \Illuminate\Database\Eloquent\Model $model |
||
65 | * @param string $attribute |
||
66 | * @param array $config |
||
67 | * @param string $slug |
||
68 | * @return \Illuminate\Database\Eloquent\Builder |
||
69 | */ |
||
70 | public function scopeFindSimilarSlugs(Builder $query, Model $model, $attribute, $config, $slug) |
||
77 | |||
78 | /** |
||
79 | * Return the sluggable configuration array for this model. |
||
80 | * |
||
81 | * @return array |
||
82 | */ |
||
83 | abstract public function sluggable(); |
||
84 | } |
||
85 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.