Search
 
SCRIPT & CODE EXAMPLE
 

PHP

url() inside laravel config files

Configs are loaded really early and probably not meant to use anything from the framework except Dotenv

return [
    'photos_url' => URL::asset('xxx'),
];

Instead you can use:

return [
    'photos_url' => env('APP_URL').'/rest_of_path.ext',
];
Comment

PREVIOUS NEXT
Code Example
Php :: php remove non utf-8 characters 
Php :: carbon greater than 
Php :: 301 redirect 
Php :: php check if multiple inputs are empty 
Php :: how to build laravel database 
Php :: upload multiple images in php 
Php :: laravel pagination problem in blade 
Php :: how create migration in laravel 
Php :: php redirect with query string 
Php :: wp_list_pluck 
Php :: php check if all array values are the same 
Php :: laravel blade conditional class 
Php :: check if array is empty php 
Php :: livewire datatable Delete column momentarily triggering confirmation dialog of last row during page load 
Php :: custom pagination laravel css 
Php :: php check valid json string 
Php :: generate entities symfony 
Php :: contact form 7 checkbox2 
Php :: doctrine querybuilder select alias 
Php :: E: Unable to locate package php7.2-fpm 
Php :: php datetime from timestamp 
Php :: php unique associative array by value 
Php :: get curl httcode php 
Php :: php json data to array 
Php :: wp php category page count products 
Php :: get user auth in laravel 
Php :: one lin if statement php 
Php :: php build query from array 
Php :: status messages wordpress settings form 
Php :: message get with return action laravel 
ADD CONTENT
Topic
Content
Source link
Name
8+3 =