Skip to content

Commit a8feed5

Browse files
committed
Traits not Classes
1 parent 6b6cf70 commit a8feed5

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

src/Http/Controllers/Api/Controller.php

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,8 +71,6 @@ abstract class Controller extends BaseController
7171
*/
7272
protected $user;
7373

74-
75-
7674
/**
7775
* Holds the available table columns
7876
*

src/Traits/Parser.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Phpsa\LaravelApiController\Exceptions\UnknownColumnException;
66

77

8-
Class Parser {
8+
Trait Parser {
99

1010
/**
1111
* Default Fields to response with.
@@ -169,6 +169,8 @@ protected function parseFieldParams() : array
169169
protected function parseLimitParams() : int
170170
{
171171

172+
$limit = $this->request->has('limit') ? intval($this->request->input('limit')) : $this->defaultLimit;
173+
172174
if ($this->maximumLimit && ($limit > $this->maximumLimit || ! $limit)) {
173175
$limit = $this->maximumLimit;
174176
}

src/Traits/Response.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Illuminate\Http\Response as Res;
66
use Illuminate\Pagination\LengthAwarePaginator;
77

8-
Class Response {
8+
Trait Response {
99

1010
/**
1111
* HTTP header status code.

0 commit comments

Comments
 (0)