Skip to content

Commit

Permalink
Merge pull request #12 from kblais/11-add-support-for-laravel-7
Browse files Browse the repository at this point in the history
Add compatibility for Laravel 7.*
  • Loading branch information
kblais authored Mar 6, 2020
2 parents cb82f90 + 6284ea3 commit c5773fb
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
"name": "kblais/laravel-helpers",
"description": "A collection of helpers for your Laravel application.",
"require": {
"illuminate/database": "^5.8|^6.0"
"illuminate/database": "^5.8|^6.0|^7.0"
},
"require-dev": {
"orchestra/testbench": "^3.8.0|^4.0",
"orchestra/testbench": "^3.8.0|^4.0|^5.0",
"friendsofphp/php-cs-fixer": "^2.15",
"phpstan/phpstan": "^0.11.12"
"phpstan/phpstan": "^0.12"
},
"autoload": {
"psr-4": {
Expand Down
4 changes: 2 additions & 2 deletions src/Eloquent/OrderByDefaultOrderTrait.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public static function bootOrderByDefaultOrderTrait()
*/
public static function withoutDefaultOrder(): Builder
{
return with(new static())->newQueryWithoutScope(static::getOrderScope());
return with(new self())->newQueryWithoutScope(static::getOrderScope());
}

public function getDefaultOrder(): array
Expand All @@ -46,7 +46,7 @@ public function getDefaultOrder(): array
*/
protected static function getOrderScope(): Scope
{
$defaultOrder = with(new static())->getDefaultOrder();
$defaultOrder = with(new self())->getDefaultOrder();

return new OrderByScope(
Arr::get($defaultOrder, 'column'),
Expand Down
1 change: 0 additions & 1 deletion src/Routing/Middleware/AreRelated.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ class AreRelated
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @param \Closure $next
* @param string $ownerParameter
* @param string $foreignParameter
* @param string $relationName
Expand Down

0 comments on commit c5773fb

Please sign in to comment.