Skip to content

Commit

Permalink
Allow Laravel 5.7
Browse files Browse the repository at this point in the history
  • Loading branch information
HighLiuk authored Feb 8, 2023
1 parent 67e3da8 commit 8c129c0
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
10 changes: 5 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,14 @@
}
],
"require": {
"php": ">=8.0",
"php": ">=7.3",
"guzzlehttp/guzzle": "^6.3 || ^7.0",
"illuminate/notifications": "^9.0.2",
"illuminate/support": "^9.0.2"
"illuminate/notifications": "^5.7",
"illuminate/support": "^5.7"
},
"require-dev": {
"orchestra/testbench": "^7.0",
"phpunit/phpunit": "^9.5.10"
"orchestra/testbench": "3.7.*",
"phpunit/phpunit": "^7.5"
},
"autoload": {
"psr-4": {
Expand Down
7 changes: 1 addition & 6 deletions src/Components/Button/AbstractButton.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,12 +38,7 @@ public function url(string $url): self
*/
public function toArray()
{
$class = Str::of(
Str::of(get_called_class())
->explode('\\')
->last()
)
->camel();
$class = Str::camel(class_basename(static::class));

return [
(string) $class => $this->payload,
Expand Down
7 changes: 1 addition & 6 deletions src/Widgets/AbstractWidget.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,7 @@ abstract class AbstractWidget implements Arrayable
*/
public function toArray()
{
$widgetName = Str::of(
Str::of(get_called_class())
->explode('\\')
->last()
)
->camel();
$widgetName = Str::camel(class_basename(static::class));

return [
(string) $widgetName => $this->payload,
Expand Down

0 comments on commit 8c129c0

Please sign in to comment.