N
N
NubasLol2018-10-01 12:10:39
Laravel
NubasLol, 2018-10-01 12:10:39

Laravel how to get current url without domain name?

I am writing my own helper, I need to get the url without the . Through the url() helper, it gives out the full url, and I don’t want to pollute the str_replace code if there are beautiful options in laravel

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Danny Chase, 2018-10-01
@NubasLol

is in PHP
$_SERVER['REQUEST_URI'];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question