File tree Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Expand file tree Collapse file tree 2 files changed +6
-7
lines changed Original file line number Diff line number Diff line change 1
1
{
2
- "version" : " v1.0.0-alpha.2 " ,
2
+ "version" : " v1.0.0-alpha.3 " ,
3
3
"last-update-type" : " patch"
4
4
}
Original file line number Diff line number Diff line change 2
2
3
3
namespace Oscabrera \JsonApiFormatPaginate ;
4
4
5
- use Illuminate \Database \Eloquent \Builder ;
5
+ use Illuminate \Database \Eloquent \Model ;
6
6
use Illuminate \Support \ServiceProvider ;
7
7
8
8
class JsonApiFormatPaginateServiceProvider extends ServiceProvider
9
9
{
10
10
public function boot (): void
11
11
{
12
- $ builder = app (Builder::class);
13
- $ builder ::macro ('getFields ' , function () {
14
- /** @var Builder $this */
15
- $ model = $ this ->getModel ();
16
- return array_merge ($ model ->getFillable (), $ model ->getHidden ()) ?? [];
12
+ $ model = app (Model::class);
13
+ $ model ::macro ('getFields ' , function () {
14
+ /** @var Model $this */
15
+ return array_merge ($ this ->getFillable (), $ this ->getHidden ()) ?? [];
17
16
});
18
17
}
19
18
}
You can’t perform that action at this time.
0 commit comments