Requests


Accessing The Request

To obtain an instance of the current HTTP request via dependency injection, you should type-hint the Shadow\Request\Input class on your controller method. The incoming request instance will automatically be injected by the service container:

partials/layout.raze.php
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Master Layout</title>
    
    {SECTION: ('styles')}
</head>
<body>
    <div class="container-fluid">
        {SECTION: ('body')}
    </div>

    {SECTION: ('scripts')}
</body>
</html>


show.raze.php
{LAYOUT: ('partials/layout')}
{START: ('body')}
    <div>
        <p>This is body</p>
        <p>{username} {age}</p>

        {IF: 1 == 1 && '{username}' == 'Ruju Bajracharya'}
            <p>Inside condition</p>
        {ENDIF}
    </div>
{END}


Loop
{LOOP:products}
    

{title}

{ENDLOOP:products}