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