• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
problem with restful format json

#1
Hello, i tray to create a restFull:

[/url][url=https://codeigniter4.github.io/userguide/incoming/restful.html#id8]https://codeigniter4.github.io/userguide/incoming/restful.html#id8


Code:
class RestMovie extends ResourceController {

    protected $modelName = 'App\Models\MovieModel';
    protected $format    = 'json';

    public function index(){

        return $this->respond($this->model->findAll());


But alwais the respond is in XML and not Json:
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.