Skip to main content
Version: 9.x


Definition & Principles

Read from the Porto SAP Documentation (#Views).


  • Views SHOULD be created inside the Containers, and they will be automatically available for use in the Web Controllers.

  • All Views are namespaced as the lower case of the Container name.

Folder Structure

 - app
- Containers
- {container-name}
- UI
- Views
- welcome.php
- profile.php
- ...

Code Sample

Welcome page View

<!DOCTYPE html>
<div class="container">
<div class="content">
<div class="title">Welcome</div>

Example: Usage From Controller


namespace App\Containers\Welcome\UI\WEB\Controllers;

use App\Ship\Parents\Controllers\WebController;

class Controller extends WebController
public function sayWelcome()
return view('just-welcome');


By default, all the Container Views are namespaced to the Container name.


If a Container named Store has View say-hello, you can access the view like this view('store::just-welcome'). If you try to access it without the namespace view('just-welcome'), it will not find your View.