Skip to content

Commit

Permalink
Backwards compatible with php7.4
Browse files Browse the repository at this point in the history
  • Loading branch information
nathanjansen committed Feb 23, 2021
1 parent 1cfc50f commit 2a45086
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 2 additions & 0 deletions resources/views/layouts/app.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,13 @@

<main class="flex-1 relative overflow-y-auto focus:outline-none" tabindex="0">
<div class="pt-2 pb-6 md:py-6">
@if ($header ?? null)
<div class="px-4 sm:px-6 md:px-8">
<h1 class="text-2xl font-semibold text-gray-900">
{{ $header }}
</h1>
</div>
@endif
<div class="mx-auto px-4 sm:px-6 md:px-8">
{{ $slot }}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/Resource.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ public function __construct(Model $resource)

public static function newModel(): ?Model
{
return isset(static::$model)
? new ($model = static::$model)
: null;
$model = isset(static::$model) ? static::$model : null;

return $model ? new $model : null;
}

public static function singularLabel(): string
Expand Down

0 comments on commit 2a45086

Please sign in to comment.