Folders and file structure
Important files to know about
For the overall project, you could ignore the Controllers of Laravel. There are also constant variable you could use which you can check from app\Http\Middleware\InitProject.php
S3 ( will handle the project path for S3 as well)
BASE_URL (use this intead of base_url() of laravel as this one also handle for different domain)
For start, you could create a new project in HAM if you want (but please change the customer to Demo). Project settings / project-path decides the naming in the code.
To start
Create a folder with the same name as project path of the project at resources\views\projects
Create a layout.blade.php
Most of the time, this is a required file you will need as the file will...well..act as an overall layout so, something like header and footer will got inherited to other page
There is also a resources\views\components\nav.blade.php to generate the menu
However in delegia-wppac, it uses its own nav component
You can check any layout.blade.php from any project I think mostly it will be the same. There are some that look different and some that include Google Analytics or others scipt
You can check all the @include and @push you could do from resources\views\layouts\default.blade.php
Also, push 'body-class' will required to end its string with space. as it will literally add class as it is.
For pathing:
You can create any path you want via file name and folder
Example:
resources\views\projects\delegia-wppac\about-us.blade.php
This will create /about-us for delegia-wppac project
resources\views\projects\delegia-wppac\index.blade.php
This will overwrite index page with this file
resources\views\projects\thailand-health-expo-2021\register\index.blade.php
This will overwrite /register page and using this file instead (of cause, you can just create register.blade.php)
While the file is in sub folder of the project, it will gain access to a bit more stuffs
resources\views\projects\fda-2021\abstract-submission\index.blade.php
Same as above, /abstract-submission
However, this will also create /abstract-submission/{id} as well.
So /abstract-submission/1234 will also access the this file
While access it this way, it will gain access to $id (the 1234) of the url
For more info you can check on routes and resources\views\stream for default page
Google Analytics
Is located in each project under /projects/.../layout.blade.php.
Last updated