Search
 
SCRIPT & CODE EXAMPLE
 

PHP

Laravel request URL

# Request URL-http://example.song/example/test?page=1

request()->url();
# http://example.song/example/test

request()->fullUrl();
# http://example.song/example/test?page=1

request()->fullUrlWithQuery(['filter'=>'applied']);
# http://example.song/example/test?page=1&filter=applied

request()->fullUrlWithoutQuery(['page']);
# http://example.song/example/test

request()->path();
# examples/test

request()->segment(2);
# test

request()->segments();
# ['example','test']
Comment

get request uri from request laravel 7

Try to use the following:
Request::getRequestUri()
Comment

how can get url from $request in laravel

$uri = $request->path();
Comment

PREVIOUS NEXT
Code Example
Php :: wordpress add class on navigation menu 
Php :: php reload current page 
Php :: php redirect if not logged in 
Php :: http error 500 phpmyadmin 
Php :: php put file in ftp server 
Php :: get_template_part parameters 
Php :: redirect all request to public folder laravel htaccess 
Php :: magento2 memory limit 
Php :: php date strtotime add days 
Php :: foreach comma separated string php 
Php :: php calculate percentage 
Php :: php get age from dob 
Php :: php header 500 
Php :: clear file contents php 
Php :: phpstan exclude line 
Php :: brew install php with specific version 
Php :: php compare strings case insensitive 
Php :: laravel dropIndex 
Php :: woocommerce my account url 
Php :: ci3 upload file 
Php :: how to add shortcode in html 
Php :: php strip tags 
Php :: laravel Post model for flat file CMS 
Php :: create custom domain in localhost xampp 
Php :: php fwrite new line 
Php :: destroy php variable 
Php :: laravel remove public from url 
Php :: php get precent price 
Php :: select session php 
Php :: redaxo mform 7 
ADD CONTENT
Topic
Content
Source link
Name
9+2 =