ACF variables in blade template

Just did more work on automating the acf fields from Controller to view.

The returned variables are based on acfs key values. You can then override any values by using the same key value in camel case in your Controller for more control.

<?php

namespace App\Controllers;

use Sober\Controller\Controller;

class Single extends Controller
{
    protected $acf = true;

    public function textField()
    {
        return 'Override automated field';
    }
}

@debug

$site_name » string
$post » object
$text_field » string
$repeater_field » array[2]

Multilevel dimensional arrays are returned in object notation based on your acf field keys.

Repeater field example below;

<h1>Repeater Field</h1>
<ul>
  @foreach($repeater_field as $item)
    <li>{{ $item->repeater_field_item }}</li>
  @endforeach
</ul>