@@ -101,15 +101,13 @@ implement those methods that you want handled.::
101101
102102 <?php namespace App\Controllers;
103103
104- use CodeIgniter\RESTful\ResourceController;
104+ use CodeIgniter\RESTful\ResourceController;
105105
106106 class Photos extends ResourceController
107- {
107+ {
108108
109- public function __construct()
110- {
111- $this->modelName = 'App\Models\Photos';
112- }
109+ protected $modelName = 'App\Models\Photos';
110+ protected $format = 'json';
113111
114112 public function index()
115113 {
@@ -133,7 +131,7 @@ for your resource, or process forms submitted from those views.
133131
134132It is not needed, since the presentation can be handled with
135133a conventional controller - it is a convenience.
136- Its usage is similar to the resosurce routing::
134+ Its usage is similar to the resource routing::
137135
138136 $routes->presenter('photos');
139137
@@ -206,15 +204,12 @@ implement those methods that you want handled.::
206204
207205 <?php namespace App\Controllers;
208206
209- use CodeIgniter\RESTful\ResourcePresenter;
207+ use CodeIgniter\RESTful\ResourcePresenter;
210208
211209 class Photos extends ResourcePresenter
212- {
210+ {
213211
214- public function __construct()
215- {
216- $this->modelName = 'App\Models\Photos';
217- }
212+ protected $modelName = 'App\Models\Photos';
218213
219214 public function index()
220215 {
0 commit comments