method()){ 'POST' => $this->store(), 'PUT', 'PATCH' => $this->update(), 'DELETE' => $this->destroy(), default => $this->index() }; } /** * Get the validation rules that apply to the get request. * * @return array */ public function index() { return [ // ]; } /** * Get the validation rules that apply to the post request. * * @return array */ public function store() { return [ // ]; } /** * Get the validation rules that apply to the put/patch request. * * @return array */ public function update() { return [ // ]; } /** * Get the validation rules that apply to the delete request. * * @return array */ public function destroy() { return [ // ]; } }