PHP code example of gabrielesbaiz / nova-card-html
1. Go to this page and download the library: Download gabrielesbaiz/nova-card-html 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/ */
gabrielesbaiz / nova-card-html example snippets
$NovaCardHtml = new Gabrielesbaiz\NovaCardHtml();
echo $NovaCardHtml->echoPhrase('Hello, Gabrielesbaiz!');
namespace App\Nova\Cards;
use Gabrielesbaiz\NovaCardHtml\NovaCardHtml;
class MyHtmlCard extends NovaCardHtml
{
/**
* Name of the card (optional)
*/
public string $title = '';
/**
* The width of the card (1/2, 1/3, 1/4 or full).
*/
public $width = '1/3';
/**
* The height strategy of the card (fixed or dynamic).
*/
public $height = 'fixed';
/**
* Align content to the center of the card.
*/
public bool $center = true;
/**
* Html content
*/
public function content(): string
{
return '<h1 class="text-4xl">Some content</h1>';
}
}
bash
php artisan nova-card-html MyHtmlCard
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.