“Wie man aktuelle URL in Laravel bekommt” Code-Antworten

Laravel Get Current Domain

request()->getHost();
TheDutchScorpion

Wie bekomme URL in Laravel

// Get the current URL without the query string...
echo url()->current();

// Get the current URL including the query string...
echo url()->full();

// Get the full URL for the previous request...
echo url()->previous();
Mohamad

Aktuelle URL ohne URL -Site Laravel

is work
{{Request::path()}}
or
request()->path()
SAMER SAEID

Wie man aktuelle URL in Laravel bekommt

//get current url
use Illuminate\Support\Facades\Route;
Route::getFacadeRoot()->current()->uri();
//get current full url
$url = url()->current();
Isaac

Holen Sie sich App -URL in Laravel

URL::to('/');
Lokesh003Coding

Laravel Get URL

Example 1: current() with Helper

$currentURL = url()->current();
  
dd($currentURL);
Example 2: full() with Helper(with query string parameters)

$currentURL = url()->full();
    
dd($currentURL);
Example 3: current() with Facade

$currentURL = URL::current();
    
dd($currentURL);
Example 4: full() with Facade(with query string parameters)

$currentURL = URL::full();
    
dd($currentURL);
Example 5: using Request

$currentURL = Request::url();
  
dd($currentURL);
Get Previous URL in Laravel:

$url = url()->previous();
  
dd($url);
Get Current Route in Laravel:


$route = Route::current()->getName();
  
dd($route);
Irfan

Ähnliche Antworten wie “Wie man aktuelle URL in Laravel bekommt”

Fragen ähnlich wie “Wie man aktuelle URL in Laravel bekommt”

Weitere verwandte Antworten zu “Wie man aktuelle URL in Laravel bekommt” auf PHP

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen