Daily Archives: 01/25/2019

Ajax for JSON

 

Output JSON

 

Laravel redirect() issue

Issue:

If ELB pass 443 port to 80 port of the web server inside, and disable 80 port on ELB, redirect() will cause problem. Because redirect() always redirect pages to http and it will not display.

Following traditional way to redirect pages will cause session problem in laravel:

Solution:

Pass full URL to redirect() function instead of URI only.

How to set BASE_URL: (in app\Providers\AppServiceProvider.php)

Suggestion:

Not to close 80 port on ELB.

Reference:

New domain for Apache

https://www.digitalocean.com/community/tutorials/how-to-set-up-apache-virtual-hosts-on-ubuntu-14-04-lts

Commands

Change permission:

Restart apache: