PHPackages                             simonbarrettact/unsplash - 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. simonbarrettact/unsplash

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

simonbarrettact/unsplash
========================

A Laravel Nova field.

0.0.6(5y ago)41372MITVuePHP &gt;=7.1.0CI failing

Since Sep 18Pushed 5y ago1 watchersCompare

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

READMEChangelog (2)DependenciesVersions (7)Used By (0)

Unsplash field for Nova
=======================

[](#unsplash-field-for-nova)

This custom field has the ability to fetch and display an image from Unsplash in Laravel Nova.

[![](https://user-images.githubusercontent.com/57679318/93665713-a9300880-fa70-11ea-9b1e-1e784d111bf6.png)](https://user-images.githubusercontent.com/57679318/93665713-a9300880-fa70-11ea-9b1e-1e784d111bf6.png)

### Installation

[](#installation)

```
composer require simonbarrettact/unsplash
```

The Unsplash field requires you to set up an Unsplash access key.

Get your Unsplash access key from [the developer dashboard](https://unsplash.com/developers) after creating an app with them.

Once you have done that, add the following line, containing your key, to your `.env` file.

```
UNSPLASH_ACCESS_KEY=

```

Then add your access key to the `config/services.php` file:

```
return [
    // ...

    'unsplash' => [
        'access_key' => env('UNSPLASH_ACCESS_KEY')
    ],

];
```

### Usage

[](#usage)

**Before using the field it will be necessary to add a column to your table.**

```
/** * Run the migrations.
 *
 * @return void
 */
 public function up()
 {
     Schema::table('my_table', function (Blueprint $table) {
        $table->string('unsplash_id', 20);
     });
 }
```

**To add your field to a resource:**

```
use SimonBarrettACT\Unsplash\Unsplash;
...
public function fields(Request $request) {
    return [
        ...
            Unsplash::make('Photo', 'unsplash_id'),
        ...
    ];
}
```

### Options

[](#options)

```
Unsplash::make('Photo', 'unsplash_id')
   ->queryPlaceholder('Provide a topic to search for') //Optional
   ->orientation('landscape') //Optional - landscape, portrait or squarish
   ->previewSize('regular')   //Optional - thumb, small, regular, full
   ->featured(true),          //Optional - set to true to only display 'featured' images
```

### Searching for images

[](#searching-for-images)

To search for an image using the field, enter a topic to search for and click the 'Search' button. A random image will be displayed. Repeated presses of the button will generate other random images. Leaving the search box empty will return a random image on any topic.

This feature is fairly basic at the moment but will be improved in future releases.

If you know the Unsplash photo's id enter it in the second input box.

### Displaying images in your app

[](#displaying-images-in-your-app)

For the easiest way of displaying Unsplash images please check out [Blade UI Kit](https://blade-ui-kit.com/docs/0.x/unsplash).

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity44

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 88.9% 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 ~27 days

Recently: every ~34 days

Total

6

Last Release

1922d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/28bdad23d78f1cfea044d2a808a7c2e9bb43ed1e73d3865d0006f5fa71e73901?d=identicon)[SimonBarrettACT](/maintainers/SimonBarrettACT)

---

Top Contributors

[![SimonBarrettACT](https://avatars.githubusercontent.com/u/57679318?v=4)](https://github.com/SimonBarrettACT "SimonBarrettACT (16 commits)")[![mightymango](https://avatars.githubusercontent.com/u/1525576?v=4)](https://github.com/mightymango "mightymango (1 commits)")[![Naxon](https://avatars.githubusercontent.com/u/293026?v=4)](https://github.com/Naxon "Naxon (1 commits)")

---

Tags

laravelnova

### Embed Badge

![Health badge](/badges/simonbarrettact-unsplash/health.svg)

```
[![Health](https://phpackages.com/badges/simonbarrettact-unsplash/health.svg)](https://phpackages.com/packages/simonbarrettact-unsplash)
```

###  Alternatives

[optimistdigital/nova-multiselect-field

A multiple select field for Laravel Nova.

3403.5M7](/packages/optimistdigital-nova-multiselect-field)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[genealabs/laravel-overridable-model

Provide a uniform method of allowing models to be overridden in Laravel.

92398.0k2](/packages/genealabs-laravel-overridable-model)[inspheric/nova-defaultable

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

51174.8k1](/packages/inspheric-nova-defaultable)[murdercode/nova4-tinymce-editor

Boost your Laravel Nova with the TinyMCE editor.

17165.2k](/packages/murdercode-nova4-tinymce-editor)[yieldstudio/nova-google-autocomplete

A Laravel Nova Google autocomplete field.

12218.4k](/packages/yieldstudio-nova-google-autocomplete)

PHPackages © 2026

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