Skip to content

Commit

Permalink
Rename workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
pontarollo-workup committed Sep 6, 2022
1 parent 5439bf4 commit b7f31cd
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{
"name": "ziffmedia/nova-select-plus",
"name": "workup/nova-select-plus",
"description": "A Nova select field for simple and complex select inputs",
"type": "library",
"license": "MIT",
Expand All @@ -16,13 +16,13 @@
},
"autoload": {
"psr-4": {
"ZiffMedia\\NovaSelectPlus\\": "src/"
"Workup\\NovaSelectPlus\\": "src/"
}
},
"extra": {
"laravel": {
"providers": [
"ZiffMedia\\NovaSelectPlus\\FieldServiceProvider"
"Workup\\NovaSelectPlus\\FieldServiceProvider"
]
}
}
Expand Down
2 changes: 1 addition & 1 deletion demo/app/Nova/Person.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Password;
use Laravel\Nova\Fields\Text;
use ZiffMedia\NovaSelectPlus\SelectPlus;
use Workup\NovaSelectPlus\SelectPlus;

class Person extends Resource
{
Expand Down
2 changes: 1 addition & 1 deletion demo/app/Nova/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
use Laravel\Nova\Fields\ID;
use Laravel\Nova\Fields\Password;
use Laravel\Nova\Fields\Text;
use ZiffMedia\NovaSelectPlus\SelectPlus;
use Workup\NovaSelectPlus\SelectPlus;

class User extends Resource
{
Expand Down
2 changes: 1 addition & 1 deletion demo/composer-nova.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"ZiffMedia\\NovaSelectPlus\\": "../src/"
"Workup\\NovaSelectPlus\\": "../src/"
},
"classmap": [
"database/seeds",
Expand Down
2 changes: 1 addition & 1 deletion demo/composer.json.dist
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
"autoload": {
"psr-4": {
"App\\": "app/",
"ZiffMedia\\NovaSelectPlus\\": "../src/"
"Workup\\NovaSelectPlus\\": "../src/"
},
"classmap": [
"database/seeds",
Expand Down
2 changes: 1 addition & 1 deletion demo/config/app.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@
App\Providers\RouteServiceProvider::class,

Laravel\Tinker\TinkerServiceProvider::class,
ZiffMedia\NovaSelectPlus\FieldServiceProvider::class
Workup\NovaSelectPlus\FieldServiceProvider::class
],

/*
Expand Down
18 changes: 9 additions & 9 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
## Installation

```
composer require ziffmedia/nova-select-plus
composer require workup/nova-select-plus
```

## Description & Use Cases

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/0-intro.gif "Intro Gif")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/0-intro.gif "Intro Gif")

This Nova component was built to satisfy the use cases just beyond Nova's built-in `<select>` component. Here are
some scenarios where you might want `SelectPlus` (which uses `vue-select`) over the simple `Select`:
Expand Down Expand Up @@ -36,7 +36,7 @@ time, to populate a pivot value useful for ordering relations.
## Usage

```php
use ZiffMedia\NovaSelectPlus\SelectPlus;
use Workup\NovaSelectPlus\SelectPlus;
```

```php
Expand Down Expand Up @@ -73,7 +73,7 @@ SelectPlus::make('States Visited', 'statesVisited', State::class)

Default is to produce a count of the number of items on the index and detail screen

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/1-default.png "Default Index")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/1-default.png "Default Index")

If a *string* name is provided, the name attribute is plucked and comma joined:

Expand All @@ -82,7 +82,7 @@ SelectPlus::make('States Lived In', 'statesLivedIn', State::class)
->usingIndexLabel('name'),
```

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/2-usingIndexLabel-string.png "string and comma separated")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/2-usingIndexLabel-string.png "string and comma separated")

If a closure is provided, it will be called, and the value will be utilized. If the value is a string, it will be placed:

Expand All @@ -91,7 +91,7 @@ SelectPlus::make('States Lived In', 'statesLivedIn', State::class)
->usingIndexLabel(fn($models) => $models->first()->name ?? ''),
```

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/3-usingIndexLabel-callback.png "return just the first name")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/3-usingIndexLabel-callback.png "return just the first name")

If an array is returned, the Index and Detail screens will produce a `<ol>` or `<ul>` list:

Expand All @@ -100,7 +100,7 @@ SelectPlus::make('States Lived In', 'statesLivedIn', State::class)
->usingIndexLabel(fn($models) => $models->pluck('name')),
```

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/4-usingDetailLabel-array.png "array of values")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/4-usingDetailLabel-array.png "array of values")

#### `->reorderable(string $pivotOrderAttribute)` - Ability to reorder multiple selects

Expand All @@ -119,7 +119,7 @@ SelectPlus::make('States Lived In', 'statesLivedIn', State::class)
->reorderable('order'),
```

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/5-reorderable.gif "reorder a list")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/5-reorderable.gif "reorder a list")

#### `->optionsQuery(closure)` - Ability to apply changes to options query object

Expand All @@ -145,4 +145,4 @@ returning a Collection will populate the dropdown:
})
```

![alt text](https://github.com/ziffmedia/nova-select-plus/raw/master/docs/6-ajaxSearchable.gif "reorder a list")
![alt text](https://github.com/workupsrl/nova-select-plus/raw/master/docs/6-ajaxSearchable.gif "reorder a list")
2 changes: 1 addition & 1 deletion src/Controller.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ZiffMedia\NovaSelectPlus;
namespace Workup\NovaSelectPlus;

use Illuminate\Database\Eloquent\Builder;
use Illuminate\Foundation\Application;
Expand Down
2 changes: 1 addition & 1 deletion src/FieldServiceProvider.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ZiffMedia\NovaSelectPlus;
namespace Workup\NovaSelectPlus;

use Illuminate\Support\Facades\Route;
use Laravel\Nova\Http\Requests\NovaRequest;
Expand Down
2 changes: 1 addition & 1 deletion src/FillStrategy/FillAttributeSyncCallback.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ZiffMedia\NovaSelectPlus\FillStrategy;
namespace Workup\NovaSelectPlus\FillStrategy;

use Illuminate\Support\Collection;
use RuntimeException;
Expand Down
2 changes: 1 addition & 1 deletion src/SelectPlus.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace ZiffMedia\NovaSelectPlus;
namespace Workup\NovaSelectPlus;

use Illuminate\Database\Eloquent\Collection as EloquentCollection;
use Illuminate\Database\Eloquent\Model;
Expand Down

0 comments on commit b7f31cd

Please sign in to comment.