Quantcast
Channel: Active questions tagged config - Stack Overflow
Viewing all articles
Browse latest Browse all 5049

How to use constant value inside blade file - Laravel

$
0
0

I want to use constant value inside blade file.I have svg tag in which I have<path> tag in which I want to use constant value.

I searched it online. I got this solutionI got these solutions.

https://www.codegrepper.com/code-examples/php/get+constant+value+in+laravelhttps://stackoverflow.com/a/42155879/7290043

As suggested in the solution. I created a constants.php

<?phpreturn [    // -------------- UI Constants'MAXIMIZE_SQAURE_ICON' => 'M14,15h-4v-2h3v-3h2v4C15,14.6,14.6,15,14,15z M13,3h-3V1h4c0.6,0,1,0.4,1,1v4h-2V3z M6,3H3v3H1V2c0-0.6,0.4-1,1-1h4V3z    M3,13h3v2H2c-0.6,0-1-0.4-1-1v-4h2V13z'];

I'm trying to use this MAXIMIZE_SQAURE_ICON value as d of <path> tag of blade file

<svg width="16" height="16"><path d="MAXIMIZE_SQAURE_ICON" /> </svg>

I also tried <path d = Config::get('constants.ADMIN_NAME') />

I'm not sure how to access it properly. I'm new to laravel.


Viewing all articles
Browse latest Browse all 5049

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>