Git Product home page Git Product logo

nova-external-image's Introduction

Laravel Nova External Image Field

An external image field for Laravel Nova

Latest Version on Packagist Total Downloads

Index Detail

Installation

Install the package into a Laravel app that uses Nova with Composer:

composer require chaseconey/nova-external-image

Usage

Add the field to your resource in the fields method:

use Chaseconey\ExternalImage\ExternalImage;

ExternalImage::make('Image')

The field extends the Laravel\Nova\Fields\Text field, so all the usual methods are available.

Options

Prefix

Prepend the image field with a prefix path. This is useful if you don't store the absolute path of images, but instead point to a cdn.

ExternalImage::make('Image')
    ->prefix('https://example.com/'),
Width

Set the width of the image (in pixels).

ExternalImage::make('Image')
    ->width(32),
Height

Set the height of the image (in pixels).

ExternalImage::make('Image')
    ->height(32),
Radius

Set the border radius of the image (in pixels).

ExternalImage::make('Image')
    ->radius(32),
Avatar

Set the image with avatar-like style (rounded and fixed height + width).

ExternalImage::make('Image')
    ->avatar(),

Search Avatar

If you want the external image to act as an Avatar in the search box use ExternalImageAsAvatar instead of ExternalImage

nova-external-image's People

Contributors

chaseconey avatar adrianthedev avatar livijn avatar ghaskell avatar repat avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.