PHP code example of goldnead / statamic-component
1. Go to this page and download the library: Download goldnead/statamic-component 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/ */
goldnead / statamic-component example snippets
namespace App\Components;
use Goldnead\StatamicComponent\Component;
class Audio extends Component
{
public $fieldsetTypes = [
// connects the 'audio_track' fieldset to the 'player' view
'audio_track' => 'player',
// connects the 'audio_playlist' fieldset to the 'playlist' view
'audio_playlist' => 'playlist',
];
}
bash
php please vendor:publish --tag=statamic-component