PHP code example of jubeki / nova-card-linkable

1. Go to this page and download the library: Download jubeki/nova-card-linkable 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/ */

    

jubeki / nova-card-linkable example snippets


// in app/Nova/Dashboards/Main.php

namespace App\Nova\Dashboards;

use Jubeki\Nova\Cards\Linkable\Linkable;
use Jubeki\Nova\Cards\Linkable\LinkableAway;
use Laravel\Nova\Cards\Help;
use Laravel\Nova\Dashboards\Main as Dashboard;

class Main extends Dashboard
{
    /**
     * Get the cards for the dashboard.
     *
     * @return array
     */
    public function cards()
    {
        return [
            (new Linkable)
            ->title('User Resource')
            ->url('/nova/resources/users')
            ->subtitle('Visit the index view of the User Resource'),

            (new LinkableAway)
            ->title('Nova Card Linkable')
            ->url('https://github.com/Jubeki/Nova-Card-Linkable/')
            ->subtitle('Visit the GitHub Repository'),

            new Help,
        ];
    }
}

$linkable->title('Title of Card');

$linkable->subtitle('Subtitle of Card');

$linkable->url('https://github.com/Jubeki/Nova-Card-Linkable');

$linkable->theme([
    'layout' => 'p-3 flex flex-col items-center justify-center h-full',
    'colors' => 'text-90 hover:text-primary-600',
    'title' => 'text-3xl font-light text-center',
    'subtitle' => 'text-lg font-light text-center',
]);

$linkable->target('_blank');

php artisan vendor:publish --provider="Jubeki\Nova\Cards\Linkable\CardServiceProvider"