PHP code example of specialfield / button-link

1. Go to this page and download the library: Download specialfield/button-link 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/ */

    

specialfield / button-link example snippets


use Specialfield\ButtonLink\ButtonLink;

public function fields(Request $request)
{
    return [
        ID::make('ID', 'id')->sortable(),
        Text::make('Name', 'name'),
        ButtonLink::make('Name')
                ->label("Label")
                ->link('your_url.com')
    ];
}

Button::make('Name', 'attribute')

Button::make('Text')->link('https://nova.laravel.com')

Button::make('Link')->buttonClasses('text-center'),

Button::make('Link')->fieldClasses('text-center'),

Button::make('Link')->fieldClasses('text-center'),

$fields = array();
$fields[] = ButtonLink::make('field_1')
        ->label("Manage")
        ->link('field_1_url')
        ->inline(true);
        
$fields[] = ButtonLink::make('field_2')
        ->label("Manage")
        ->link('field_2_url')
        ->inline(true);
        
    
public function fields(Request $request)
{
    return [
        new Panel('Services', fields),
    ];
}