https with laravel

Laravel မှာ asset ကို သုံးသည့် အခါမှာ အဓိက ပြဿနာက https ဆိုရင် အကုန်အလုပ်မလုပ်တော့တာပဲ။ ဒါကြောင့် https ကို support ဖြစ်အောင် အောက်ကလို ပြင်လို့ရပါတယ်။ ပထမဆုံး .env မှာ HTTPS = true ဆိုပြီး ထည့်လိုက်ပါ။ app/Providers/AppServiceProvider.php က boot မှာ URL::forceScheme('https'); ကို ထည့်ဖို့ လိုပါတယ်။ public function boot() { if (env('HTTPS')) { URL::forceScheme('https'); } } ဒါဆိုရင် .env မှာ HTTPS ကို true ဖြစ်ရင် https ကို သုံးပြီးတော့ မဟုတ်ခဲ့ရင်တော့…More