master

laravel/framework

Last updated at: 29/12/2023 09:21

Engine.php

TLDR

This file contains the Engine interface from the Illuminate\Contracts\View namespace. It defines a single method called get which is responsible for getting the evaluated contents of a view.

Methods

get

This method accepts a view path and an optional data array, and returns the evaluated contents of the view as a string. The view path is a string that represents the location of the view file. The data array is used to pass variables to the view.

Classes

<?php

namespace Illuminate\Contracts\View;

interface Engine
{
    /**
     * Get the evaluated contents of the view.
     *
     * @param  string  $path
     * @param  array  $data
     * @return string
     */
    public function get($path, array $data = []);
}