1. Go to this page and download the library: Download wuemv/content-sdk-laravel 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/ */
use Wuemv\ContentSdk\Client;
class BlogController
{
public function __construct(private Client $wue) {}
public function index()
{
$posts = $this->wue->entries->list('blog');
return view('blog.index', compact('posts'));
}
}
use App\Wue\BlogEntry;
use App\Wue\ContentType;
$posts = Wue::entries()->list(ContentType::Blog);
// Returns BlogEntry[] — typed accessors available
foreach ($posts as $post) {
/** @var BlogEntry $post */
echo $post->title();
echo $post->coverImage();
}
bash
php artisan vendor:publish --tag=wue-config
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.