|
|
@@ -5,6 +5,7 @@ namespace App;
|
|
|
use App\Constraint\MoreThanOrEqualsConstraint;
|
|
|
use App\Constraint\NotInConstraint;
|
|
|
use App\Enums\SalesOrderStatuses;
|
|
|
+use App\Interfaces\OptionInterface;
|
|
|
use App\Traits\DateTimeTrait;
|
|
|
use App\Traits\SoftDeleteTrait;
|
|
|
use Carbon\CarbonImmutable;
|
|
|
@@ -27,7 +28,7 @@ use RuntimeException;
|
|
|
* @property string $contact_email
|
|
|
*/
|
|
|
|
|
|
-class Location extends Model {
|
|
|
+class Location extends Model implements OptionInterface {
|
|
|
|
|
|
protected static $table = "location";
|
|
|
protected static $idField = "id";
|
|
|
@@ -181,4 +182,12 @@ class Location extends Model {
|
|
|
"order" => "desc",
|
|
|
]);
|
|
|
}
|
|
|
+
|
|
|
+ public function getOptionValue(): string {
|
|
|
+ return $this->getIdString();
|
|
|
+ }
|
|
|
+
|
|
|
+ public function getOptionLabel(): string {
|
|
|
+ return $this->name ?? "";
|
|
|
+ }
|
|
|
}
|