PHP code example of jacksleight / statamic-distill
1. Go to this page and download the library: Download jacksleight/statamic-distill 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/ */
jacksleight / statamic-distill example snippets
use JackSleight\StatamicDistill\Facades\Distill;
$youtubeVideoSets = Distill::query($value)
->type('set:video')
->where('url', 'like', '%youtube.com%')
->get();
use JackSleight\StatamicDistill\Facades\Distill;
use Statamic\Facades\Collection;
use Statamic\Statamic;
$value = $entry->augmentedValue('content');
$data = Distill::bard($value);
$value = $entry->augmentedValue('builder');
$text = Distill::text($value);
// app/Stills/Sections.php
namespace App\Stills;
use JackSleight\StatamicDistill\Stills\Still;
class Sections extends Still
{
public function apply($query, $values)
{
$query->path('builder.*')->type('set:section');
}
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.