How to get site URL in Laravel 5?By Hardik Savani | April 11, 2016 | | 1657 Viewer | Category : Laravel
Share this post:
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 create custom facade in laravel 5.2?
- Simple PHP Jquery Ajax CRUD(insert update delete) tutorial example with source code
- How to create and use Middleware in Laravel 5?
- PHP download file from url using curl example
- Laravel 5 Ajax CRUD with Pagination example and demo from scratch
- Bootstrap - Show/Hide(toggle) Password input field using bootstrap-show-password.js Plugin
- Laravel 5 select with sum query example
- How to select concat columns with Laravel Query Builder?