Constants creation in laravel 5.4

global constant defining in laravel 5

in config/ folder create a file constants.php

there you can add any constats as

[code language="php"]<?php

return [

'APP_URL' => 'xxx.xxx.x.x:8545',
];
?>[/code]

to call those simpley

[code]{{ config('constants.APP_KEY') }}[/code]

Comments

Popular posts from this blog

Simple Mail Sending Contact Form using PHP and Jquery

Codeigniter with Admin LTE

onclick anchor tag open url in bootstrap model