@@ -65,7 +65,7 @@ public function getIdField() : string
65
65
/**
66
66
* Expressive way to use the destroy method via dao repository
67
67
*
68
- * @return \EdStevo\Dao\Repositories \BaseModel
68
+ * @return \EdStevo\Dao\Models \BaseModel
69
69
*/
70
70
public function daoUpdate (array $ data = []) : BaseModel
71
71
{
@@ -77,7 +77,7 @@ public function daoUpdate(array $data = []) : BaseModel
77
77
/**
78
78
* Expressive way to use the destroy method via dao repository
79
79
*
80
- * @return \EdStevo\Dao\Repositories \BaseModel
80
+ * @return \EdStevo\Dao\Models \BaseModel
81
81
*/
82
82
public function daoIncrement (string $ field = "" , int $ value = 1 ) : BaseModel
83
83
{
@@ -127,7 +127,7 @@ public function daoGetRelationWhere(string $relation, array $constraints = []) :
127
127
* @param string $relation
128
128
* @param array $data
129
129
*
130
- * @return \EdStevo\Dao\Repositories \BaseModel
130
+ * @return \EdStevo\Dao\Models \BaseModel
131
131
*/
132
132
public function daoStoreRelation (string $ relation , array $ data = []) : BaseModel
133
133
{
@@ -138,10 +138,10 @@ public function daoStoreRelation(string $relation, array $data = []) : BaseModel
138
138
* Expressive way to use the update relation method with this model via the dao repository
139
139
*
140
140
* @param string $relationship
141
- * @param \EdStevo\Dao\Repositories \BaseModel $relation
141
+ * @param \EdStevo\Dao\Models \BaseModel $relation
142
142
* @param array $data
143
143
*
144
- * @return \EdStevo\Dao\Repositories \BaseModel
144
+ * @return \EdStevo\Dao\Models \BaseModel
145
145
*/
146
146
public function daoUpdateRelation (string $ relationship , BaseModel $ relation , array $ data = []) : BaseModel
147
147
{
@@ -152,7 +152,7 @@ public function daoUpdateRelation(string $relationship, BaseModel $relation, arr
152
152
* Expressive way to use the update pivot method with this model via the dao repository
153
153
*
154
154
* @param string $relationship
155
- * @param \EdStevo\Dao\Repositories \BaseModel $relation
155
+ * @param \EdStevo\Dao\Models \BaseModel $relation
156
156
* @param array $data
157
157
*
158
158
* @return int
@@ -166,7 +166,7 @@ public function daoUpdatePivot(string $relationship, BaseModel $relation, array
166
166
* Expressive way to use the destroy relation method with this model via the dao repository
167
167
*
168
168
* @param string $relationship
169
- * @param \EdStevo\Dao\Repositories \BaseModel $relation
169
+ * @param \EdStevo\Dao\Models \BaseModel $relation
170
170
*
171
171
* @return bool
172
172
*/
@@ -179,7 +179,7 @@ public function daoDestroyRelation(string $relationship, BaseModel $relation) :
179
179
* Expressive way to use the attach method with this model via the dao repository
180
180
*
181
181
* @param string $relation
182
- * @param \EdStevo\Dao\Repositories \BaseModel $model
182
+ * @param \EdStevo\Dao\Models \BaseModel $model
183
183
* @param array $pivotData
184
184
*/
185
185
public function daoAttach (string $ relation , Model $ model , array $ pivotData = [])
@@ -242,7 +242,7 @@ public function getRules() : array
242
242
/**
243
243
* Return the dao repository related to this model
244
244
*
245
- * @return \EdStevo\Dao\Repositories \BaseModel
245
+ * @return \EdStevo\Dao\Models \BaseModel
246
246
*/
247
247
public function getDaoRepository ()
248
248
{
@@ -252,7 +252,7 @@ public function getDaoRepository()
252
252
/**
253
253
* Flush this model's dao's cache
254
254
*
255
- * @return \EdStevo\Dao\Repositories \BaseModel
255
+ * @return \EdStevo\Dao\Models \BaseModel
256
256
*/
257
257
public function flushDaoCache () : BaseModel
258
258
{
@@ -264,7 +264,7 @@ public function flushDaoCache() : BaseModel
264
264
/**
265
265
* Flush this model's dao's cache
266
266
*
267
- * @return \EdStevo\Dao\Repositories \BaseModel
267
+ * @return \EdStevo\Dao\Models \BaseModel
268
268
*/
269
269
public function flushModelCache () : BaseModel
270
270
{
@@ -278,9 +278,10 @@ public function flushModelCache() : BaseModel
278
278
*
279
279
* @return string
280
280
*/
281
- private function getModelName () : string
281
+ public function getModelName () : string
282
282
{
283
- return collect (explode ('\\' , get_class ($ this )))->last ();
283
+ $ namespace = basename (get_class ($ this ), ".php " );
284
+ return collect (explode ('\\' , $ namespace ))->last ();
284
285
}
285
286
286
287
/**
0 commit comments