How to get site URL in Laravel 5?By Hardik Savani | April 11, 2016 | | 8981 Viewer | Category : Laravel
Here is quick post, which can help you to get base url or home page url of your laravel application. I think many times we need to get site URL for something share or link, so you can get that using url helper and URL facade. Both way are same you can use that anywhere i mean in controller or view. so let's see.
$url = URL::to("/");
$url2 = url('/');
- Laravel 5 Twitter OAuth using Socialite Package
- How to remove all whitespace from string in JQuery?
- Laravel 5 create word document file using phpoffice/phpword package
- How to execute artisan commands from route or controller in Laravel ?
- Crop, Resize, Frames etc on selected image in php using Aviary
- How to create custom facade in laravel 5.2?
- How to get filename without extension in PHP?
- How to use collapse example in Bootstrap?