Views

All presentation layer to users, commonly with UI

Create your first view

Go to terminal/cmd/Powershell/gitbash or anyother console tool and type:

$ php BoosterCLI make:view users/index

Now go to:

resources/Views/modules/users/

Then you will find index.php file, you don´t need to add extentions in any helper, and BoosterCLI support creating a view with folders and subfolders like in this case "users/" is the subfolder of modules and "index" is the name of the current view, but you could still creating more subfolders, and if its created you could add more views to subfolder just with include it on path to the view like this:

$ php BoosterCLI make:view users/test/subtest/fileOfView

So you could order your views as you want, please write your html or php code inside your view file and save it.

( If you are particularly original go and write a hello world :) ) .

Now go to your browser and type:

http://localhost/framework/users

So then you will have your view.

Now you know the basics of routing system with PHP Booster, so what happen with send data to views files?

That´s in the next section with a code example ->

Last updated