Cakephp api POST request , saving data without validation

Advertisements I have created a route with Api prefix $routes->scope(‘/api’, function (RouteBuilder $routes) { $routes->setExtensions([‘json’]); $routes->post( ‘/add-categories’, [‘controller’ => ‘Miles’, ‘action’ => ‘addCategories’,’prefix’=>’Api’] ); } I have created a controller file in directory Controller/Api/MilesController.php I have created a addCategory method like below public function addCategories() { $categoriesTable = $this->fetchTable(‘Categories’); $categoryEnt = $categoriesTable->newEmptyEntity(); if ($this->request->is(‘post’)) {… Read More Cakephp api POST request , saving data without validation