Skip to content

Commit

Permalink
Merge pull request #39 from TheDragonCode/3.x
Browse files Browse the repository at this point in the history
Added Laravel 11 support
  • Loading branch information
andrey-helldar committed Mar 12, 2024
2 parents 71b60b5 + 4eb4a71 commit 06484f1
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
13 changes: 6 additions & 7 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,16 +39,15 @@
],
"require": {
"php": "^7.2 || ^8.0",
"illuminate/container": ">=6.0 <11.0",
"illuminate/database": ">=6.0 <11.0",
"illuminate/http": ">=6.0 <11.0",
"illuminate/support": ">=6.0 <11.0",
"illuminate/container": ">=6.0 <12.0",
"illuminate/database": ">=6.0 <12.0",
"illuminate/http": ">=6.0 <12.0",
"illuminate/support": ">=6.0 <12.0",
"ramsey/uuid": "^3.7 || ^4.0",
"symfony/var-dumper": "^4.0 || ^5.0 || ^6.0"
"symfony/var-dumper": "^4.0 || ^5.0 || ^6.0 || ^7.0"
},
"require-dev": {
"laravel/framework": ">=6.0 <11.0",
"laravel/lumen-framework": ">=6.0 <11.0"
"laravel/framework": ">=6.0 <12.0"
},
"conflict": {
"andrey-helldar/laravel-support": "*"
Expand Down
2 changes: 1 addition & 1 deletion src/Eloquent/Concerns/HasCustomRelationships.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ protected function hasManyCustom(string $related, ?string $foreign_key = null, ?
return $this->newHasManyCustom(
$instance->newQuery(),
$model,
"{$foreign_table}.{$foreign_key}",
"$foreign_table.$foreign_key",
$local_key
);
}
Expand Down
5 changes: 5 additions & 0 deletions src/Support/AppVersion.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,11 @@ public function is10x(): bool
return $this->major() === 10;
}

public function is11x(): bool
{
return $this->major() === 11;
}

public function major(): int
{
return (int) Str::before($this->version(), '.');
Expand Down

0 comments on commit 06484f1

Please sign in to comment.