PHPackages                             razorcreations/ajax-field - 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. razorcreations/ajax-field

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

razorcreations/ajax-field
=========================

A searchable AJAX powered field for Laravel Nova 3 and 4.

1.3.0(1y ago)13133.2k—7.8%10[3 issues](https://github.com/razorcreations/nova-ajax-field/issues)MITVuePHP ^7.3|^8.0

Since Jun 30Pushed 1y ago2 watchersCompare

[ Source](https://github.com/razorcreations/nova-ajax-field)[ Packagist](https://packagist.org/packages/razorcreations/ajax-field)[ RSS](/packages/razorcreations-ajax-field/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (18)Used By (0)

AJAX Field for Laravel Nova
===========================

[](#ajax-field-for-laravel-nova)

[![Latest Stable Version](https://camo.githubusercontent.com/3a013623910a8958294a9d6996e67ef63866c05a7e22a0eeff1e3eca2de2d633/68747470733a2f2f706f7365722e707567782e6f72672f72617a6f726372656174696f6e732f616a61782d6669656c642f76)](//packagist.org/packages/razorcreations/ajax-field) [![Total Downloads](https://camo.githubusercontent.com/1f9673ac8b1e18acdf9f4762ed4d5fddfbf2515e30e11f6196bab3b15828b3f8/68747470733a2f2f706f7365722e707567782e6f72672f72617a6f726372656174696f6e732f616a61782d6669656c642f646f776e6c6f616473)](//packagist.org/packages/razorcreations/ajax-field) [![Latest Unstable Version](https://camo.githubusercontent.com/9027309b228b6d1af44e90448c119884048f6125bc7a972676117132b5e55a83/68747470733a2f2f706f7365722e707567782e6f72672f72617a6f726372656174696f6e732f616a61782d6669656c642f762f756e737461626c65)](//packagist.org/packages/razorcreations/ajax-field) [![License](https://camo.githubusercontent.com/856e66cf8f1bf7a1e89a213c69f4c5b3274ad11729f0e4778540fe9f407753e9/68747470733a2f2f706f7365722e707567782e6f72672f72617a6f726372656174696f6e732f616a61782d6669656c642f6c6963656e7365)](//packagist.org/packages/razorcreations/ajax-field)

[![Preview](https://camo.githubusercontent.com/986c708dad3f13cd6d2768e8ab1d6f24905290adc5646368e1e60710f9b61d32/687474703a2f2f672e7265636f726469742e636f2f6b516c6a56514e6964442e676966)](https://camo.githubusercontent.com/986c708dad3f13cd6d2768e8ab1d6f24905290adc5646368e1e60710f9b61d32/687474703a2f2f672e7265636f726469742e636f2f6b516c6a56514e6964442e676966)

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

[](#installation)

`composer require razorcreations/ajax-field`

For Nova 3 support use

`composer require razorcreations/ajax-field@0.3.2`

Usage
-----

[](#usage)

```
	use Razorcreations\AjaxField\AjaxField;

	// Inside your resources fields definition
	AjaxField::make('Foo')->setUrl('/api/ajaxselect/foo'),

	// If you are using integers or floats for the values ensure to chain on the type methods...
	AjaxField::make('Foo')->setUrl('/api/ajaxselect/foo')->typeInt(),
```

The field expects the response from the AJAX call to respond with a JSON array of options in the following format:

```
[
	{
		"label": "Bob",
		"value": 1,
	},
	{
		"label": "Jenny",
		"value": 2,
	}
]
```

If you wish you can override the default keys of "value" and "label" using the following methods:

```
	AjaxField::make('Foo')->setUrl('/api/ajaxselect/foo')->setValueKey('id')->setLabelKey('name'),
```

You can pass through another Nova fields value by adding the parent method with the key of the nova field

```
	// Create a parent field
	Text::make('Foo', 'foo');

	// Create ajax field, with parent method
	AjaxField::make('Bar')->setUrl('/api/ajaxselect/foo')->parent('foo'),
```

This will hit the AjaxUrl with the fields key value pair appended as a get param e.g. /api/ajaxselect/foo?foo=value

Rather than having the options loaded in once on page load, you can use -&gt;responsive() to pass through the field value when the input value changes

```
	AjaxField::make('Foo')->setUrl('/api/ajaxselect/foo')->responsive(),
```

Contributing
------------

[](#contributing)

If you would like to contribute please fork the project and submit a PR.

### Coding Standards

[](#coding-standards)

- `composer run fix` to fix any PHP linting issues automatically
- `composer run lint` to show any PHP linting issues
- `npm run fix` to fix any JS/Vue linting issue automatically
- `npm run lint` to show any JS/Vue linting issues

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity41

Moderate usage in the ecosystem

Community17

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 65% 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 ~106 days

Recently: every ~2 days

Total

16

Last Release

551d ago

Major Versions

0.3.5 → 1.1.02024-11-05

PHP version history (2 changes)0.1.0PHP &gt;=7.1.0

1.1.0PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/52cac8c553958a16d74f5aae37563981b9a510bc7c476f57b63b77263c704652?d=identicon)[philjf1](/maintainers/philjf1)

---

Top Contributors

[![garygarside](https://avatars.githubusercontent.com/u/1265680?v=4)](https://github.com/garygarside "garygarside (13 commits)")[![StephenHonor](https://avatars.githubusercontent.com/u/6010639?v=4)](https://github.com/StephenHonor "StephenHonor (4 commits)")[![JKHarley](https://avatars.githubusercontent.com/u/27085725?v=4)](https://github.com/JKHarley "JKHarley (1 commits)")[![nea](https://avatars.githubusercontent.com/u/392035?v=4)](https://github.com/nea "nea (1 commits)")[![rossjcooper](https://avatars.githubusercontent.com/u/3597958?v=4)](https://github.com/rossjcooper "rossjcooper (1 commits)")

---

Tags

ajax-fieldhacktoberfestlaravel-novanova-fieldlaravelajaxfieldnova

###  Code Quality

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/razorcreations-ajax-field/health.svg)

```
[![Health](https://phpackages.com/badges/razorcreations-ajax-field/health.svg)](https://phpackages.com/packages/razorcreations-ajax-field)
```

###  Alternatives

[timothyasp/nova-color-field

A Laravel Nova Color Picker field.

781.6M5](/packages/timothyasp-nova-color-field)[alexwenzel/nova-dependency-container

A Laravel Nova 4 form container for grouping fields that depend on other field values.

461.0M2](/packages/alexwenzel-nova-dependency-container)[simplesquid/nova-enum-field

A Laravel Nova field to add enums to resources.

52391.9k2](/packages/simplesquid-nova-enum-field)[outhebox/nova-hidden-field

A Laravel Nova Hidden field.

33562.2k1](/packages/outhebox-nova-hidden-field)[sietse85/nova-button

(Nova 4+) A Laravel Nova package for adding buttons to your resources.

37347.3k](/packages/sietse85-nova-button)[inspheric/nova-defaultable

Default values for Nova fields when creating resources and running resource actions.

51174.8k1](/packages/inspheric-nova-defaultable)

PHPackages © 2026

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