PHP code example of webx-ui / module-reviews

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

    

webx-ui / module-reviews example snippets


[
    'id' => 12,
    'anchor' => 'review-12',
    'categories' => [3, 5],
    'name' => 'Anna Petrova',
    'initials' => 'AP',          // what stands in for a missing photo
    'job_title' => 'CEO, Acme',  // '' when there is none
    'text' => "…\n…",
    'rating' => 5,               // or null
    'date' => '2026-09-20',      // or null
    'profile' => 'https://…',    // or null
    'photo' => ['url' => …, 'thumb' => …, 'width' => …, 'height' => …, 'alt' => …], // or null
    'fields' => ['city' => 'Kyiv'], // the project's own fields, by name
]
bash
composer migrate
php artisan webx:blocks:offered --install --module=reviews
blade
@foreach ($reviews['items'] as $review)
    <figure>
        <blockquote>{!! nl2br(e($review['text'])) !!}</blockquote>
        <figcaption>{{ $review['name'] }}</figcaption>
    </figure>
@endforeach