Views

Basic workflow

The Assely framework fully utilizes Laravel Views. Please visit official documentation for a comprehensive descriptions.

Oh yes, you can use all that goodness in your Assely application.

Create view template

Make your view template inside resources/views directory.

<!-- resources/views/welcome.blade.php -->

<html>
    <head>
        <title>Welcome to Assely</title>
    </head>
    <body>
        <h1>Hello, {{ $name }}!</h1>
    </body>
</html>

Render view inside controller

Create a controller that renders your view.

// app/Http/Controllers/WelcomeController.php

namespace App\Http\Controllers;

use View;

class HomeController extends Controller
{
    /**
     * Display a list of resources.
     *
     * @return void
     */
    public function index()
    {
        return View::make('welcome', ['name' => 'John Smith']);
    }
}

Link Route with Controller

// app/Http/routes.php

Route::get('/', 'WelcomeController@index');