Welcome Guest, Not a member yet? Register   Sign In
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




Theme © iAndrew 2016 - Forum software by © MyBB