PHP Classes

File: README.md

Recommend this page to a friend!
  Classes of Naif Alshaye   Laravel Nova Text Field with Icon   README.md   Download  
File: README.md
Role: Documentation
Content type: text/markdown
Description: Documentation
Class: Laravel Nova Text Field with Icon
Show a text field with custom icon in Laravel Nova
Author: By
Last change:
Date: 5 years ago
Size: 1,199 bytes
 

Contents

Class file image Download

Nova text field with customizable font-awesome icons

A Laravel Nova text field with a custom icon

Installation:

You can install the package in to a Laravel app that uses Nova via composer:

composer require naif/text-with-icon

Usage:

<h4>Add the below to nova/resources/views/layout.blade.php</h4>

<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.3.1/css/all.css" integrity="sha384-mzrmE5qonljUremFsqc01SB46JvROS7bZs3IO2EmfFsd15uHvIt+Y8vEf7N7fWAU" crossorigin="anonymous">

<h4>Add the below to Nova/User.php resource:</h4>


  TextWithIcon::make('test')
      ->icon('fab fa-twitter-square') //set icon full name. Browse icon gallery at https://fontawesome.com/icons?d=gallery&m=free
      ->position('in') //here you can set icon position to be inside or outside the text field.
      ->color('#1997EF'),//also you can set icon color
         

<img src="https://raw.githubusercontent.com/naifalshaye/nova-text-field-with-icon/master/screenshots/screenshot.png" width="700">

Support:

naif@naif.io

https://www.linkedin.com/in/naif

License:

The MIT License (MIT). Please see License File for more information.