The "global" means functions that I can call everywhere on pages and layouts without repeating them on every place where I should use them
The "global" means functions that I can call everywhere on pages and layouts without repeating them on every place where I should use them
You can create your own custom plugin and use registerMarkupTags inside Plugin.php
public function registerMarkupTags()
{
return [
'functions' => [
'currentUrl' => function () {
return request()->getRequestUri();
},
'currentUrlFull' => function () {
return URL::to(request()->getRequestUri());
},
'ip' => function () {
return Request::ip();
}
]
];
}