PHPackages                             outerweb/nova-link-picker - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. outerweb/nova-link-picker

AbandonedLibrary[Utility &amp; Helpers](/categories/utility)

outerweb/nova-link-picker
=========================

A Laravel Nova field to generates links

v1.1.0(2y ago)03MITVuePHP ^8.0

Since Dec 10Pushed 9mo agoCompare

[ Source](https://github.com/outer-web/nova-link-picker)[ Packagist](https://packagist.org/packages/outerweb/nova-link-picker)[ Docs](https://github.com/outer-web/nova-link-picker)[ RSS](/packages/outerweb-nova-link-picker/feed)WikiDiscussions main Synced 2d ago

READMEChangelogDependencies (3)Versions (3)Used By (0)

Caution

This package has been abandoned.

Nova Link Picker
================

[](#nova-link-picker)

[![Latest Version on Packagist](https://camo.githubusercontent.com/52b6ef7c32ceaf0816a2559dde8e08fc80e7f67202b475321c66d63028ea88af/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6f757465727765622f6e6f76612d6c696e6b2d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outerweb/nova-link-picker)[![Total Downloads](https://camo.githubusercontent.com/50a35c4c07d975a0f2776abe6fd6a63e8d07aa6c9a853d4ad07b3b05abcc04c3/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f757465727765622f6e6f76612d6c696e6b2d7069636b65722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/outerweb/nova-link-picker)

This package provides a Nova field to generate a link. It shows a select field with the routes of your application you want to be used as a link. It also provides fixed options like `external`, `mailto` and `tel`. Route model binding is automatically applied to the parameters to give the user dropdowns with the available options.

Screenshots
-----------

[](#screenshots)

### Edit

[](#edit)

[![Index](docs/screenshots/nova-edit-page.png)](docs/screenshots/nova-edit-page.png)

### Index

[](#index)

[![Index](docs/screenshots/nova-index-page.png)](docs/screenshots/nova-index-page.png)

### Detail

[](#detail)

[![Detail](docs/screenshots/nova-detail-page.png)](docs/screenshots/nova-detail-page.png)

Installation
------------

[](#installation)

You can install the package via composer:

```
composer require outerweb/nova-link-picker
```

You can publish the config file with:

```
php artisan vendor:publish --tag="nova-link-picker-config"
```

This is the contents of the published config file:

```
return [
    'link_entity' => \Outerweb\NovaLinkPicker\Entities\Link::class,
    'api_base_url' => '/nova-vendor/outerweb/nova-link-picker',
    'available_options' => [
        'open_in_new_tab' => true,
        'download' => true,
    ]
];
```

Usage
-----

[](#usage)

This field stores its value as a JSON string in the database. So you need to make sure the column in the database is a `json` column (or `text` if `json` is not (yet) supported by your DB engine).

The value of the field looks like this:

```
{
    "routeName": string,
    "parameters": [
        [
            "name": string,
            "value": int|string
        ]
    ],
    "options": {
        "openInNewTab": bool,
        "download": bool
    }
}
```

To make it easier to work with this value, you can use the `Outerweb\NovaLinkPicker\Casts'LinkPickerCast` cast.

```
use Outerweb\NovaLinkPicker\Casts\LinkPickerCast;

...

protected $casts = [
    'link' => LinkPickerCast::class,
];
```

This cast will cast the value to a `Outerweb\NovaLinkPicker\Entities'Link` instance.

On this instance you can call the following methods / properties:

```
// Returns the route name as a string
// The routeName value can come from your applications registered routes
// or from the fixed options when it starts with `external.`:
// - `external.url` for an external url
// - `external.mailto` for a mailto link
// - `external.tel` for a tel link
$link->routeName;

// Returns the parameters as an array
$link->parameters;

// Returns the options as an array
$link->options;

// Generate the route (just like you would do with Laravel's `route()` helper)
$link->route();

// Get the target attribute value for the link
$link->target();

// Check if the link is an external link
$link->isExternal();

// Check if the link should be a download link
$link->isDownload();

// Render the link attributes (`href`, `target` and optionally `download`)
// Example: renderAttributes() }}>Click me!
$link->renderAttributes();
```

Add the following syntax to the routes you want to be available in the select field:

```
Route::get('my-route', function () {
    // ...
})->name('my-route')
    ->where('nova-link-picker', 'true');
```

By default, the label of the route will be the route name. If the route contains a dot, the label will split the parts with a "&gt;" character. For example: `my-route` will be `My route` and `my-route.sub-route` will be `My route > Sub route`. You can always customize the label of your named routes by adding the following to your routes:

```
Route::get('my-route', function () {
    // ...
})->name('my-route')
    ->where('nova-link-picker', 'true')
    ->where('nova-link-picker-label', __('My custom label'));
```

Add the field to your Nova resource:

```
use Outerweb\NovaLinkPicker\Nova\Fields\LinkPicker;

...

public function fields(Request $request)
{
    return [
        LinkPicker::make('Link')
            // This will Str::limit() the value on the Nova index table
            ->abbreviated()
            // This will hide the `download` option
            ->withoutDownload()
            // This will hide the `open in new tab` option
            ->withoutOpenInNewTab(),
    ];
}
```

Overwriting
-----------

[](#overwriting)

Sometimes your application requires some custom logic. We've tried to make it as easy as possible to overwrite the default behavior.

You can overwrite the `LinkPicker` field by creating a new field that extends the `LinkPicker` field. This way, you can just overwrite the methods you want to change.

```
namespace App\Nova\Fields;

use Outerweb\NovaLinkPicker\Nova\Fields\LinkPicker as BaseLinkPicker;

class LinkPicker extends BaseLinkPicker
{
    // Your custom code here
}
```

You can overwrite the `Link` entity by creating a new entity that extends the `Link` entity. This way, you can just overwrite the methods you want to change.

```
namespace App\Entities;

use Outerweb\NovaLinkPicker\Entities\Link as BaseLink;

class Link extends BaseLink
{
    // Your custom code here
}
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- [Simon Broekaert](https://github.com/SimonBroekaert)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 47% of packages

Maintenance42

Moderate activity, may be stable

Popularity3

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

937d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/d5a072b1191f02ac21a84af067a579b6f3323da7e45197369a7540f98c152407?d=identicon)[outerweb.be](/maintainers/outerweb.be)

---

Top Contributors

[![SimonBroekaert](https://avatars.githubusercontent.com/u/35606498?v=4)](https://github.com/SimonBroekaert "SimonBroekaert (5 commits)")

### Embed Badge

![Health badge](/badges/outerweb-nova-link-picker/health.svg)

```
[![Health](https://phpackages.com/badges/outerweb-nova-link-picker/health.svg)](https://phpackages.com/packages/outerweb-nova-link-picker)
```

###  Alternatives

[markwalet/nova-modal-response

A Laravel Nova asset for Modal responses on an action.

17878.9k](/packages/markwalet-nova-modal-response)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
