Skip to main content
Version: Next ๐Ÿšง


Definition & Principles#

Read Porto SAP Documentation (#Views).


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

Folder Structure#

- app
- Containers
- {section-name}
- {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>

Usage From Controller#

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


  • By default, all Views are namespaced as the camelCase of its Section name + @ + camelCase of its Container name.

For example, a view named welcome-page inside MySection > MyContainer can be accessed like this: view([email protected]::welcome-page)

If you try to access it without the namespace view('just-welcome'), it will not find your View.


View files in Ship folder are exception to this and will be namespaced with the word "ship" instead of section name, e.g. view(ship::welcome-page)

Last updated on by Mohammad Alavi