diff --git a/composer.json b/composer.json index b01d1d9..25e762a 100644 --- a/composer.json +++ b/composer.json @@ -51,7 +51,7 @@ "name": "master" } }, - "version": "1.0.4", + "version": "1.0.5", "minimum-stability": "dev", "prefer-stable": true } diff --git a/ide-helper/Collection.php b/ide-helper/Collection.php index bba7bb4..930d285 100644 --- a/ide-helper/Collection.php +++ b/ide-helper/Collection.php @@ -2,7 +2,7 @@ namespace Illuminate\Support { /** - * @method \Ringlesoft\LaravelSelectable\Facades\Selectable toSelectable() + * @method \Ringlesoft\LaravelSelectable\Selectable toSelectable() * @mehtbod string toSelectOptions(string|callable $label = null, string|callable $value = null, mixed $selected = null, mixed $disabled = null) */ class Collection diff --git a/src/Facades/Selectable.php b/src/Facades/Selectable.php index 8dd46a7..1baa064 100644 --- a/src/Facades/Selectable.php +++ b/src/Facades/Selectable.php @@ -2,13 +2,28 @@ namespace Ringlesoft\LaravelSelectable\Facades; +use Closure; +use Illuminate\Support\Collection; use Illuminate\Support\Facades\Facade; -use RingleSoft\LaravelSelectable\LaravelSelectableServiceProvider; +/** + * @method static self fromCollection(Collection $collection) + * @method static string collectionToSelectOptions(Collection $collection, string|Closure|null $label = null, string|Closure|null $value = null, mixed $selected = null, mixed $disabled = null) + * @method static Collection toCollection() + * @method static string toSelectOptions() + * @method static Collection toSelectItems() + * @method static self withLabel(string|Closure $label) + * @method static self withValue(string|Closure $value) + * @method static self withSelected(mixed $selected) + * @method static self withDisabled(mixed $disabled) + * @method static self withDataAttribute(string|Closure $attribute, string|Closure $value) + * @method static self withClass(string|array|Closure $class) + * @method static self withId(Closure $id) + */ class Selectable extends Facade { protected static function getFacadeAccessor(): string { - return LaravelSelectableServiceProvider::class; + return \RingleSoft\LaravelSelectable\Selectable::class; } }