1. Go to this page and download the library: Download banulakwin/laravel-metadata 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/ */
banulakwin / laravel-metadata example snippets
use Banulakwin\Metadata\Services\MetadataService;
use Inertia\Inertia;
public function index(MetadataService $metadata)
{
return Inertia::render('Home', [
'site' => $metadata->getGroupDecoded('site'),
]);
}
use Banulakwin\Metadata\Facades\Meta;
use Inertia\Inertia;
return Inertia::render('Home', [
'site' => Meta::getGroupDecoded('site'),
]);
use Banulakwin\Metadata\Services\MetadataService;
use Inertia\Inertia;
public function index(MetadataService $metadata)
{
return Inertia::render('Home', [
'supportEmail' => $metadata->get('site', 'support_email'),
'flags' => $metadata->getGroupDecoded('feature_flags'),
]);
}