Answers for "laravel get path name"

PHP
4

laravel file path

use Illuminate\Support\Facades\Storage;

$path = Storage::path('file.jpg');
Posted by: Guest on October-17-2020
2

laravel get url path

$currentURL = URL::current(); PHP.
$url = URL::to("/"); or use $url = url('/'); PHP.
$route = Route::current()->getName(); PHP.
$prefix = Request::route()->getPrefix(); PHP.
Posted by: Guest on December-13-2021

Browse Popular Code Answers by Language