How to get site URL in Laravel 5?By Hardik Savani | April 11, 2016 | | 20844 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('/');
- How to optimize website speed and performance in Laravel 5.5 ?
- Jquery - Show hide password in Password textbox using checkbox.
- Example of Cron Job in Laravel 5
- Laravel 5 - How to get route parameters in your route middleware?
- How to add query string automatically on laravel pagination links ?
- Laravel 5 dynamic autocomplete search using select2 JS Ajax - Part 1
- Fixed - MassAssignmentException in model.php laravel 5?
- How to get last executed query in Larave 5?