PHP code example of khalin / nova-link-field

1. Go to this page and download the library: Download khalin/nova-link-field library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

khalin / nova-link-field example snippets

 
Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
 
Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->text("Go To Stripe")
 
Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->text("Go To Stripe")
                ->icon()
 
Link::make('Charge Id', 'stripe_id')
                ->url(function () {
                    return "https://dashboard.stripe.com/payments/{$this->stripe_id}";
                })
                ->blank()

Link::make('Charge Id', 'stripe_id')
                ->classes(function () {
                    return null === $this->charge_id ? 'charge__pending' : "charge_successfull";
                })