I'm using Laravel 5.2
. Below is one example of url()
usage in one of my view (blade) file:
<form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}">
..
..
</form>
It returns me non-https urls like:
http://www.example.com/register
I need it to be HTTPS. I'm already using valid HTTPS on my Website.
In my .env
file, it is already:
APP_URL=https://www.example.com
In my config/app.php
, it is already:
'url' => env('APP_URL', 'https://www.example.com'),
So what else do i need to configure for the LV 5.2
to return the HTTPS urls via url()
helper function please?
Thank you.
Instead of url()
you can simply use secure_url()
<form class="form-horizontal" role="form" method="POST" action="{{ secure_url('/register') }}">
..
..
</form>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With