Skip to content

Commit a01d165

Browse files
authored
Merge pull request #69 from desaintflorent/laravel-13-support
Laravel 13 support
2 parents 4000e17 + b788157 commit a01d165

3 files changed

Lines changed: 51 additions & 47 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Therefore, if you decide to use my packages, please kindly consider making a don
3333
| Laravel | PHP | Nova Map Field |
3434
|---------------|--------|-----------------------------------------------------------------|
3535
| ^8.0 - ^9.0 | ^8.0.2 | [^3.0](https://github.com/mostafaznv/nova-map-field/tree/3.2.0) |
36-
| ^10.0 - ^11.0 | ^8.1 | ^4.0 (latest) |
36+
| ^10.0 - ^13.0 | ^8.1 | ^4.0 (latest) |
3737

3838

3939

composer.json

Lines changed: 44 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -1,46 +1,46 @@
11
{
2-
"name": "mostafaznv/nova-map-field",
3-
"description": "Map Field for Laravel Nova",
4-
"keywords": [
5-
"laravel",
6-
"map",
7-
"map marker",
8-
"point",
9-
"polygon",
10-
"multi polygon",
11-
"spatial",
12-
"openlayers",
13-
"geocoder",
14-
"nova"
15-
],
16-
"license": "MIT",
17-
"require": {
18-
"php": "^8.1",
19-
"illuminate/support": "^10.0|^11.0|^12.0",
20-
"laravel/nova": "^4.0|^5.0",
21-
"matanyadaev/laravel-eloquent-spatial": "^4.2"
22-
},
23-
"autoload": {
24-
"psr-4": {
25-
"Mostafaznv\\NovaMapField\\": "src/"
26-
}
27-
},
28-
"extra": {
29-
"laravel": {
30-
"providers": [
31-
"Mostafaznv\\NovaMapField\\NovaMapFieldServiceProvider"
32-
]
33-
}
34-
},
35-
"repositories": [
36-
{
37-
"type": "composer",
38-
"url": "https://nova.laravel.com"
39-
}
40-
],
41-
"config": {
42-
"sort-packages": true
43-
},
44-
"minimum-stability": "dev",
45-
"prefer-stable": true
2+
"name": "mostafaznv/nova-map-field",
3+
"description": "Map Field for Laravel Nova",
4+
"keywords": [
5+
"laravel",
6+
"map",
7+
"map marker",
8+
"point",
9+
"polygon",
10+
"multi polygon",
11+
"spatial",
12+
"openlayers",
13+
"geocoder",
14+
"nova"
15+
],
16+
"license": "MIT",
17+
"require": {
18+
"php": "^8.1",
19+
"illuminate/support": "^10.0|^11.0|^12.0|^13.0",
20+
"laravel/nova": "^4.0|^5.0",
21+
"matanyadaev/laravel-eloquent-spatial": "^4.2"
22+
},
23+
"autoload": {
24+
"psr-4": {
25+
"Mostafaznv\\NovaMapField\\": "src/"
26+
}
27+
},
28+
"extra": {
29+
"laravel": {
30+
"providers": [
31+
"Mostafaznv\\NovaMapField\\NovaMapFieldServiceProvider"
32+
]
33+
}
34+
},
35+
"repositories": [
36+
{
37+
"type": "composer",
38+
"url": "https://nova.laravel.com"
39+
}
40+
],
41+
"config": {
42+
"sort-packages": true
43+
},
44+
"minimum-stability": "dev",
45+
"prefer-stable": true
4646
}

src/Traits/WithMapProps.php

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,14 +84,18 @@ public function __construct($name, $attribute = null, callable $resolveCallback
8484
$this->showDetailButton = $config['show-detail-button'];
8585

8686
$this->showSearchBox = $searchConfig['enable'];
87-
$this->searchProvider = $searchConfig['provider'];
87+
$this->searchProvider = $searchConfig['provider'] instanceof MapSearchProvider
88+
? $searchConfig['provider']
89+
: MapSearchProvider::from($searchConfig['provider']);
8890
$this->searchProviderApiKey = $searchConfig['api-key'];
8991
$this->searchAutocomplete = $searchConfig['autocomplete'];
9092
$this->searchAutocompleteMinLength = $searchConfig['autocomplete-min-length'];
9193
$this->searchAutocompleteTimeout = $searchConfig['autocomplete-timeout'];
9294
$this->searchLanguage = $searchConfig['language'];
9395
$this->searchPlaceholder = __($searchConfig['placeholder']);
94-
$this->searchBoxType = $searchConfig['box-type'];
96+
$this->searchBoxType = $searchConfig['box-type'] instanceof MapSearchBoxType
97+
? $searchConfig['box-type']
98+
: MapSearchBoxType::from($searchConfig['box-type']);
9599
$this->searchResultLimit = $searchConfig['limit'];
96100
$this->searchResultKeepOpen = $searchConfig['keep-open'];
97101

0 commit comments

Comments
 (0)