PHP code example of iag / metadata

1. Go to this page and download the library: Download iag/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/ */

    

iag / metadata example snippets


// main layout

<!DOCTYPE html>
<html>
    <head>
        <!-- Metadata -->
        @stack('metadata')

    </head>
    <body></body>
</html>

@extends('layouts.page')

@section('content')
<section>
    <h2>{{ $article->title }}</h2>

    <div>{{ $article->body }}</div>
</section>
@endsection

// push metadata view on the stack
@push('metadata')
    @

// push metadata view on the stack
@push('metadata')
    @article->author->name,
        'twitter' => false, // don't use twitter metadata for a specific content
    ])
@endpush
bash
php artisan vendor:publish