Code Helper
Meta Robots Tag
Meta robots “noindex,nofollow”
- The noindex,nofollow combination tells search engines not to index the page and not to follow the links on the page, meaning no link authority should be passed on either.
<?php if (SERVER_MODE != "LIVE") {?>
<meta name="robots" content="noindex,nofollow" />
<?php }?>
Component, Helper Files
- Add New Helper file (
Modules\cms\app\Components\Helpers\VideoAlbumHelper.php
)
- Add new function in helper file
Use Helper function
$videoAlbumList = VideoAlbumHelper::getCategoryList(null, null, true);
Constants
- Constants added in config file (
config\constants-cms.php
)
- Used constant name
PHP Functions
- Functions can be added in PHP file of helpers folder (e.g.
MILaravel10App\Modules\Common\app\Helpers
,MILaravel10App\Modules\Cms\app\Components\Helpers
, etc).
- Function can be added in PHP file.
JS Functions and code
Common
- JS codes can be added in (
MILaravel10App\Modules\Common\resources\views\__partial
) folder
- Add common function for js.
Tools
- JS codes can be added in (
MILaravel10App\Modules\Tools\resources\views\__partial
) folder.
- Add js function and code for tools
Frontend
- JS codes can be added in (
MILaravel10App\Modules\Cms\resources\js\frontend.js
).
- Add js function and code for frontend.