From bdfcba39da02b311c5f370d87e9b7b8be8b604b8 Mon Sep 17 00:00:00 2001 From: Maxime Date: Tue, 12 Nov 2024 13:28:17 +0100 Subject: [PATCH] fix slug --- src/Entity/Entity.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Entity/Entity.php b/src/Entity/Entity.php index bbf87aa..5b50d95 100644 --- a/src/Entity/Entity.php +++ b/src/Entity/Entity.php @@ -4,9 +4,13 @@ namespace Bluesquare\Pilot\Entity; abstract class Entity { - public function __construct(protected $slug = null) - { + protected $slug = null; + public function __construct($slug = null) + { + if (! is_null($slug)) { + $this->slug = $slug; + } } public function slug()