Skip to content

Commit 38da82c

Browse files
committed
Merge branch '1.x'
2 parents a1aaaab + c556536 commit 38da82c

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
"name": "master"
5252
}
5353
},
54-
"version": "1.0.1",
54+
"version": "1.0.2",
5555
"minimum-stability": "dev",
5656
"prefer-stable": true
5757
}

ide-helper/Collection.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?php
2+
3+
namespace Illuminate\Support {
4+
/**
5+
* @method \Ringlesoft\LaravelSelectable\Facades\Selectable toSelectable()
6+
* @mehtbod string toSelectOptions(string|callable $label = null, string|callable $value = null, mixed $selected = null, mixed $disabled = null)
7+
*/
8+
class Collection
9+
{
10+
}
11+
}
12+

src/LaravelSelectableServiceProvider.php

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,15 @@ public function register(): void
1616
public function boot(): void
1717
{
1818
$this->publishItems();
19+
1920
$this->mergeConfigFrom(
2021
__DIR__ . '/../config/laravel_selectable.php', 'laravel_selectable'
2122
);
2223
Collection::macro('toSelectOptions', function (
2324
string|Closure|null $label = null,
2425
string|Closure|null $value = null,
25-
mixed $selected = null,
26-
mixed $disabled = null
26+
mixed $selected = null,
27+
mixed $disabled = null
2728
) {
2829
return Selectable::collectionToSelectOptions($this, $label, $value, $selected, $disabled);
2930
});
@@ -42,8 +43,11 @@ private function publishItems(): void
4243
], 'laravel-selectable-config');
4344

4445
$this->publishes([
45-
__DIR__ . '/../resources/views' => resource_path('views/vendor/ringlesoft/process_approval'),
46+
__DIR__ . '/../resources/views' => resource_path('views/vendor/ringlesoft/laravel_selectable'),
4647
], 'laravel-selectable-views');
4748

49+
$this->publishes([
50+
__DIR__ . '/../ide-helper/Collection.php' => base_path('_ide_helper_laravel_selectable.php'),
51+
], 'ide-helper');
4852
}
4953
}

0 commit comments

Comments
 (0)