Tampilkan postingan dengan label Tips. Tampilkan semua postingan
Tampilkan postingan dengan label Tips. Tampilkan semua postingan

Hallo, 

When Your finish with your laravel project and then you will upload laravel project in server, especially to Share hosting, you must setting .htaccess file. because this file very important for your laravel project by default laravel not setting for https redirect.


What is HTTPS?

Hypertext transfer protocol secure (HTTPS) is the secure version of HTTP, which is the primary protocol used to send data between a web browser and a website. HTTPS is encrypted in order to increase security of data transfer. This is particularly important when users transmit sensitive data, such as by logging into a bank account, email service, or health insurance provider.

Any website, especially those that require login credentials, should use HTTPS. In modern web browsers such as Chrome, websites that do not use HTTPS are marked differently than those that are. Look for a padlock in the URL bar to signify the webpage is secure. Web browsers take HTTPS seriously; Google Chrome and other browsers flag all non-HTTPS websites as not secure.

Why is HTTPS important? What happens if a website doesn’t have HTTPS?


HTTPS prevents websites from having their information broadcast in a way that’s easily viewed by anyone snooping on the network. When information is sent over regular HTTP, the information is broken into packets of data that can be easily “sniffed” using free software. This makes communication over the an unsecure medium, such as public Wi-Fi, highly vulnerable to interception. In fact, all communications that occur over HTTP occur in plain text, making them highly accessible to anyone with the correct tools, and vulnerable to on-path attacks.

 



Agar Kode kita menjadi rapi, bisa terbaca dengan jelas dan tidak berantakan maka kita harus merapikan penulisan kodenya, dalam kasus ini saya ingin menghapus semua baris kosong yang ada pada file kode saya.

Langkah-langkahnya sangat mudah sekali : 

  1. Tekan Tombol Ctrl + H (Pencarian Cepat)
  2. Klik "Use Regular Expressions"
  3. Di Kolom Find ketik ^$\n
  4. Klik "Replace All" untuk menghapus semua baris kosong.



Hasilnya jadi lebih rapi : 


Selain menggunakan Find and Replace, kita juga bisa menggunakan Extension Formatter di Visual Studio Code untuk merapikan penulisan kode kita.

Semoga Bermanfaat!
Routing atau Route atau Rute dalam Framework laravel adalah salah satu yang paling penting, karena mulai dari route ini lah kita bisa merancang tujuan dari website tersebut.

jadi case nya kali ini adalah tentang routing dengan nilai atau parameter yang sama selalu saja nyasar ke routing lain, ternyata penyebabnya adalah penempatan routing nya.

Poin nya adalah Routing Statis harus ditempatkan paling atas, Posisi routing statis harus ada paling atas dari routing dinamis.

Kalian bisa coba jalankan contoh routing ini agar lebih jelas.

Penempatan Routing pada script diatas akan menyebabkan route statis (rute yg bawah) tidak akan berjalan, karena  routing dinamis terlebih dahulu menproses nya.

Kesimpulannya 
Selalu tempatkan routing statis dipaling atas ya. Semoga bermanfaat!