| @@ 15-22 (lines=8) @@ | ||
| 12 | * @param string $class |
|
| 13 | * @return static |
|
| 14 | */ |
|
| 15 | public static function mandatoryFromField(string $class): self |
|
| 16 | { |
|
| 17 | return new static( |
|
| 18 | 'The model '.$class.' uses the HasSlug trait'.PHP_EOL. |
|
| 19 | 'You are required to set the field from where to generate the slug ($fromField)'.PHP_EOL. |
|
| 20 | 'You can do this from inside the getSlugOptions() method defined on the model.' |
|
| 21 | ); |
|
| 22 | } |
|
| 23 | ||
| 24 | /** |
|
| 25 | * The exception to be thrown when the "to field" has not been supplied to the sluggable functionality. |
|
| @@ 30-37 (lines=8) @@ | ||
| 27 | * @param string $class |
|
| 28 | * @return static |
|
| 29 | */ |
|
| 30 | public static function mandatoryToField(string $class): self |
|
| 31 | { |
|
| 32 | return new static( |
|
| 33 | 'The model '.$class.' uses the HasSlug trait'.PHP_EOL. |
|
| 34 | 'You are required to set the field where to store the generated slug ($toField)'.PHP_EOL. |
|
| 35 | 'You can do this from inside the getSlugOptions() method defined on the model.' |
|
| 36 | ); |
|
| 37 | } |
|
| 38 | } |
|
| 39 | ||
| @@ 45-52 (lines=8) @@ | ||
| 42 | * @param string $class |
|
| 43 | * @return static |
|
| 44 | */ |
|
| 45 | public static function mandatoryRouting(string $class): self |
|
| 46 | { |
|
| 47 | return new static( |
|
| 48 | 'The model '.$class.' uses the HasUrl trait'.PHP_EOL. |
|
| 49 | 'You are required to set the routing from where Laravel will dispatch it\'s route requests.'.PHP_EOL. |
|
| 50 | 'You can do this from inside the getUrlOptions() method defined on the model.' |
|
| 51 | ); |
|
| 52 | } |
|
| 53 | ||
| 54 | /** |
|
| 55 | * The exception to be thrown when the "from field" has not been supplied to the urlable functionality. |
|
| @@ 60-67 (lines=8) @@ | ||
| 57 | * @param string $class |
|
| 58 | * @return static |
|
| 59 | */ |
|
| 60 | public static function mandatoryFromField(string $class): self |
|
| 61 | { |
|
| 62 | return new static( |
|
| 63 | 'The model '.$class.' uses the HasUrl trait'.PHP_EOL. |
|
| 64 | 'You are required to set the field from where to generate the url slug ($fromField)'.PHP_EOL. |
|
| 65 | 'You can do this from inside the getUrlOptions() method defined on the model.' |
|
| 66 | ); |
|
| 67 | } |
|
| 68 | ||
| 69 | /** |
|
| 70 | * The exception to be thrown when the "to field" has not been supplied to the urlable functionality. |
|
| @@ 75-82 (lines=8) @@ | ||
| 72 | * @param string $class |
|
| 73 | * @return static |
|
| 74 | */ |
|
| 75 | public static function mandatoryToField(string $class): self |
|
| 76 | { |
|
| 77 | return new static( |
|
| 78 | 'The model '.$class.' uses the HasUrl trait'.PHP_EOL. |
|
| 79 | 'You are required to set the field where to store the generated url slug ($toField)'.PHP_EOL. |
|
| 80 | 'You can do this from inside the getUrlOptions() method defined on the model.' |
|
| 81 | ); |
|
| 82 | } |
|
| 83 | } |
|
| 84 | ||