| @@ 12-20 (lines=9) @@ | ||
| 9 | return []; |
|
| 10 | } |
|
| 11 | ||
| 12 | public function translationRules() |
|
| 13 | { |
|
| 14 | $id = $this->route()->getParameter('post')->id; |
|
| 15 | ||
| 16 | return [ |
|
| 17 | "title" => "required", |
|
| 18 | "slug" => "required|unique:blog__post_translations,slug,$id,post_id,locale,$this->localeKey", |
|
| 19 | ]; |
|
| 20 | } |
|
| 21 | ||
| 22 | public function authorize() |
|
| 23 | { |
|
| @@ 12-20 (lines=9) @@ | ||
| 9 | return []; |
|
| 10 | } |
|
| 11 | ||
| 12 | public function translationRules() |
|
| 13 | { |
|
| 14 | $id = $this->route()->getParameter('tag')->id; |
|
| 15 | ||
| 16 | return [ |
|
| 17 | 'name' => "required|unique:blog__tag_translations,name,$id,tag_id,locale,$this->localeKey", |
|
| 18 | 'slug' => "required|unique:blog__tag_translations,slug,$id,tag_id,locale,$this->localeKey", |
|
| 19 | ]; |
|
| 20 | } |
|
| 21 | ||
| 22 | public function authorize() |
|
| 23 | { |
|