Our first ever, semi-official conference is tomorrow — grab your Statameet ticket now!

HomeController with blade view


i try to use statamic with my own Controller and Blade as template engine and have problems to access my entry/blueprint data inside my view like i can do with antlers views.

How i can access/pass my home entry data $title $author $bard to my view like $foo?

What i have done:

Route::get('/', HomeController::class)


namespace App\Http\Controllers;

use Illuminate\Http\Request;

class HomeController extends Controller
    public function __invoke()
        $foo = 'bar';

        return view('home', compact('foo'));



<ul class="flex space-x-4">
        <a href="{{ $item['url'] }}"@if($item['is_current'] || $item['is_parent']) class="current"@endif>
          {{ $item['title'] }}

{{ $title }} <---- variable not defined!
{{ $author }} <---- variable not defined!
{{ $bard }} <---- variable not defined!

{{ $foo }} <---- returns bar

>>>>>>> Unanswered <<<<<<<
3 Replies