Laravel

From Corat Coret

Migration

Migrasi file spesifik

php artisan migrate:refresh --path=/database/migrations/fileName.php

Menggunakan koneksi spesifik

php artisan migrate --database=mysql

Production

Khusus untuk cloudflare Untuk menghindari case: laravel was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint bisa ditambahkan middleware trusted proxies sbb:

class TrustProxies extends Middleware
{
    /**
     * The trusted proxies for this application.
     *
     * @var array<int, string>|string|null
     */
protected $proxies = [
'103.21.244.0/22',
'103.22.200.0/22',
'103.31.4.0/22',
'104.16.0.0/12',
'108.162.192.0/18',
'131.0.72.0/22',
'141.101.64.0/18',
'162.158.0.0/15',
'172.64.0.0/13',
'173.245.48.0/20',
'188.114.96.0/20',
'190.93.240.0/20',
'197.234.240.0/22',
'198.41.128.0/17'];

Daftar ip4v bisa didapat di https://www.cloudflare.com/ips/

Atau bisa juga menggunakan plugins Trust Cloudflare's Proxies for Laravel