user()->can('create', Joined::class); } /** * Get the validation rules that apply to the request. * * @return array */ public function rules() { return [ 'categories' => ['required', 'array'], 'categories.*' => ['numeric', 'exists:categories,id'], 'subject' => ['required', 'string'], 'status' => ['required', 'string', Rule::in(['current', 'upcoming'])], 'slug' => ['required', 'alpha_dash'], 'title' => ['nullable', 'string'], 'image' => ['nullable', 'image'], 'opened' => ['nullable', 'date'], 'hold_member_updates' => ['nullable', 'boolean'], ]; } }