maxlibin Posted April 30, 2013 Share Posted April 30, 2013 (edited) Hi guys, I am new to php oop, I am trying get an object of sibling method inside a class, seems not working. here is how i do it. class Upload extends Base_controller{ private function sql () { $get = Upload::all(); } public function get_index() { dd($this->sql()->get); } } Edited April 30, 2013 by maxlibin Quote Link to comment Share on other sites More sharing options...
requinix Posted April 30, 2013 Share Posted April 30, 2013 Use return values just like you would any other function. private function sql() { return Upload::all(); } public function get_index() { dd($this->sql()); // ??? } Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.