L
L
Lavrov952018-02-06 17:08:18
Twig
Lavrov95, 2018-02-06 17:08:18

How to send data to twig file?

<?php

namespace App\Controllers;

use App\Models\Album;

class HomeController extends Controller
{
   public function index($request, $response)
    {

        $data = Album::all();

        return $this->view->render($response,'home.twig');
    }
}

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question