Skip to content

input_get() is being invoked for every method :POST,PUT,DELETE #1

Description

@AliSaeed0405

i followed and rechecked the tutorial closely . it is working on my local but on Linux shared hosting every time i hit a rest api call with POST method index_get() is executing . Any help will be appreciated.

load->database(); } //POST:/student public function index_post() { print_r("post"); } //PUT:/student public function index_put() { print_r("put"); } //DELET:/student public function index_delete() { print_r("delete"); } //GET:/student public function index_get() { $this->db->select("*"); $this->db->from("services"); $query =$this->db->get(); if(count($query->result())>0){ $this->response(array( "status" =>1, "message"=>"Services found", "data"=>$query->result() ),REST_Controller::HTTP_OK); } else{ $this->response(array( "status" =>0, "message"=>"No Services found", "data"=>$query->result() ),REST_Controller::HTTP_NOT_FOUND); } } } ?>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions