<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Esenabdullahemin on Medium]]></title>
        <description><![CDATA[Stories by Esenabdullahemin on Medium]]></description>
        <link>https://medium.com/@esenabdullahemin?source=rss-b85bc9c3576e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*4QlLBtrNB5TbFxz4</url>
            <title>Stories by Esenabdullahemin on Medium</title>
            <link>https://medium.com/@esenabdullahemin?source=rss-b85bc9c3576e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 15:24:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@esenabdullahemin/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Sunucu, Sıfırdan: Tek Script’le HTTPS’li Bir OpenResty Sunucusu]]></title>
            <link>https://medium.com/@esenabdullahemin/sunucu-s%C4%B1f%C4%B1rdan-tek-scriptle-https-li-bir-openresty-sunucusu-d55b261f6371?source=rss-b85bc9c3576e------2</link>
            <guid isPermaLink="false">https://medium.com/p/d55b261f6371</guid>
            <category><![CDATA[digitalocean]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[openresty]]></category>
            <category><![CDATA[cloudflare]]></category>
            <category><![CDATA[linux]]></category>
            <dc:creator><![CDATA[Esenabdullahemin]]></dc:creator>
            <pubDate>Mon, 10 Aug 2026 13:46:41 GMT</pubDate>
            <atom:updated>2026-08-10T13:46:41.511Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4j1jMHjBeM4P-ngOOdmROw.png" /></figure><p>Uzun süredir uygulama geliştiriyorum ama sunucu tarafı hep biraz “kara kutu” kalmıştı. Kodun çalıştığı yeri gerçekten anlamak için en iyi yolun onu bizzat kurmak olduğunu düşünerek DigitalOcean’dan en küçük droplet’i aldım ve sıfırdan kurcalamaya başladım.</p><p>Başta her adımı elle yaptım. Sonunda öğrendiğim her şeyi tek bir kurulum dosyası formatına dönüştürdüm: droplet oluştururken yapıştırdığın, kendini baştan sona kuran, sonunda HTTPS’li ve çalışır bir sunucu bırakan bir setup script&#39;i. Bu yazıda o script&#39;in yaptığı her işlemi, ne olduğunu ve ne işe yaradığını anlatıyorum.</p><h3>Yaklaşım: tek atışta, cloud-init’e dayanıklı</h3><p>Amaç şuydu: droplet’i sürekli açık tutup boşuna ücret işletmemek. İşim bitince sil, gerektiğinde tek komutla sıfırdan kur. Bunun için tüm adımları bir script’e döktüm ve DigitalOcean’ın <strong>user-data (cloud-init)</strong> kutusuna yapıştırılabilir hale getirdim — yani sunucu ilk açılışta kendini kuruyor.</p><p>Tek atışta kurulumun iki klasik pürüzü var, script ikisini de çözüyor:</p><p><strong>“Yumurta–tavuk” problemi.</strong> Let’s Encrypt’ten SSL alabilmek için domain’in sunucuya işaret etmesi gerekir. Ama sunucu daha yeni kuruluyor ve IP’si henüz belli. Çözüm: kurulumun ortasında Cloudflare API’siyle DNS kaydını otomatik güncellemek (aşağıda).</p><p><strong>Dayanıklılık.</strong> SSL adımı bir sebeple başarısız olursa (ör. DNS henüz yayılmadı) script durmuyor; site HTTP olarak ayakta kalıyor, sertifikayı sonra tek komutla tamamlıyorsun. cloud-init “failed” damgası yemiyor.</p><p>Bir de küçük ama kritik bir ayrıntı: cloud-init ilk açılışta çalışırken unattended-upgrades arka planda apt kilidini tutuyor olabilir. Bu yüzden apt komutlarını, kilit boşalana kadar bekleyen küçük bir yardımcıyla sarıyorum:</p><pre>wait_apt() {<br>  while fuser /var/lib/dpkg/lock-frontend &gt;/dev/null 2&gt;&amp;1; do<br>    echo &quot;apt kilidi bekleniyor...&quot;; sleep 5<br>  done<br>}<br>wait_apt; apt-get update<br>wait_apt; apt-get install -y jq dnsutils curl</pre><p>jq Cloudflare API&#39;sinin JSON cevaplarını ayrıştırmak, dnsutils (dig) DNS yayılımını kontrol etmek için.</p><h3>1. Swap: az RAM’e karşı sigorta</h3><p>En küçük paket 512 MB RAM. Bir apt upgrade ya da derleme sırasında bellek dolarsa çekirdek süreçleri OOM (out of memory) ile öldürür ve sunucu takılır. Swap, disk üzerinde &quot;yedek RAM&quot; gibi davranıp bunu önler.</p><pre>fallocate -l 1G /swapfile<br>chmod 600 /swapfile<br>mkswap /swapfile<br>swapon /swapfile<br>echo &#39;/swapfile none swap sw 0 0&#39; &gt;&gt; /etc/fstab<br># 512 MB&#39;da swap agresif kullanılmasın, RAM öncelikli kalsın<br>sysctl -w vm.swappiness=10</pre><p>Script bunu koşullu (idempotent) yapıyor: swap zaten varsa tekrar oluşturmuyor. Böylece script’i ikinci kez çalıştırsan bir şey bozulmuyor.</p><h3>2. Sudo’lu, parolasız (anahtar tabanlı) kullanıcı</h3><p>Her şeyi root ile yapmak tehlikeli: root&#39;un hiçbir freni yok ve internetteki botların neredeyse tamamı &quot;root&quot; kullanıcısını hedefleyerek şifre dener. Bu yüzden sudo yetkili normal bir kullanıcı açıyorum — ve parolayı hiç açmıyorum; giriş yalnızca SSH anahtarıyla olacak:</p><pre>adduser --disabled-password --gecos &quot;&quot; emin<br>usermod -aG sudo emin</pre><p>--disabled-password şifreli girişi baştan kapatır; --gecos &quot;&quot; isim/telefon sorularını atlar. Günlük işleri bu kullanıcıyla yapıp yönetici gerektiğinde başına sudo ekliyorsun — her kullanımı da loglanıyor.</p><h3>3. Firewall (ufw): sadece gereken kapılar açık</h3><p>Her açık port potansiyel bir kapıdır. Sadece SSH (22), HTTP (80) ve HTTPS (443) açık kalsın:</p><pre>ufw allow OpenSSH<br>ufw allow 80<br>ufw allow 443<br>ufw --force enable</pre><p>enable&#39;dan önce SSH&#39;ı açtığından emin ol; yoksa kendini sunucudan kilitlersin.</p><h3>4. fail2ban: brute-force denemelerini otomatik banla</h3><p>fail2ban logları izler ve belirli sayıda başarısız denemeden sonra o IP&#39;yi banlar. Kendi kuralımı yazıyorum: 4 başarısız denemede 1 saat ban.</p><pre>apt-get install -y fail2ban<br>cat &gt; /etc/fail2ban/jail.local &lt;&lt;&#39;EOF&#39;<br>[sshd]<br>enabled = true<br>port = ssh<br>maxretry = 4<br>bantime = 1h<br>findtime = 10m<br>EOF<br>systemctl restart fail2ban</pre><p>/var/log/auth.log&#39;u bir süre izlemek başlı başına öğretici — dünyanın dört bir yanından gelen deneme trafiğini kendi gözünle görüyorsun.</p><h3>5. OpenResty: nginx’i bir uygulama platformuna çevir</h3><p>İşin en keyifli kısmı buydu. <strong>OpenResty</strong>, kabaca “süper güçlere sahip nginx”: nginx’in üstüne hızlı bir Lua motoru (LuaJIT) ve bir dizi modül eklenmiş bir dağıtım. Sonuç, sunucun sadece dosya sunan bir şey olmaktan çıkıp <strong>gelen her isteğe kod (Lua) yazabildiğin</strong> bir platforma dönüşüyor.</p><p>Resmi deposundan kuruluyor (imzalı keyring ile):</p><pre>apt-get install -y wget gnupg ca-certificates lsb-release<br>wget -O - https://openresty.org/package/pubkey.gpg | gpg --dearmor -o /usr/share/keyrings/openresty.gpg<br>echo &quot;deb [signed-by=/usr/share/keyrings/openresty.gpg] http://openresty.org/package/ubuntu $(lsb_release -sc) main&quot; \<br>  &gt; /etc/apt/sources.list.d/openresty.list<br>apt-get update<br>apt-get install -y openresty</pre><p>OpenResty’yi tek başına içerik sunan bir web sunucusu olarak değil, arkadaki uygulamanın önünde bir <strong>reverse proxy</strong> olarak kurdum. Yani dış dünyayla konuşan, SSL’i sonlandıran, isteği süzen katman OpenResty; asıl işi yapan uygulama arkada, sadece 127.0.0.1&#39;i dinliyor.</p><h3>6. Arka uç: küçük bir uygulama + systemd</h3><p>Öğrenme amaçlı basit bir arka uç koydum — sadece 127.0.0.1:3000&#39;i dinleyen, saati ve ziyaret sayısını gösteren küçük bir Python uygulaması. Önemli olan uygulamanın kendisi değil, onu <strong>sürekli ayakta tutan mekanizma</strong>: systemd servisi. Çökerse otomatik yeniden başlıyor, sunucu yeniden açılınca kendisi kalkıyor.</p><pre>[Unit]<br>Description=Dinamik Uygulama<br>After=network.target<br><br>[Service]<br>Type=simple<br>User=emin<br>WorkingDirectory=/home/emin/dinamik-app<br>ExecStart=/usr/bin/python3 /home/emin/dinamik-app/app.py<br>Restart=always<br>RestartSec=3<br><br>[Install]<br>WantedBy=multi-user.target</pre><pre>systemctl daemon-reload<br>systemctl enable --now dinamik-app</pre><p>Restart=always satırı, &quot;sürekli açık duran servis&quot; fikrinin tam kalbi: bir daemon çökse bile systemd onu geri getiriyor.</p><h3>7. Cloudflare DNS otomasyonu: yumurta–tavuk’u çözmek</h3><p>Burası script’in en kritik parçası. Her yeni droplet farklı bir IP alıyor; bu yüzden subdomain’in A kaydını her kurulumda güncellemek gerekiyor. Bunu elle yapmak yerine Cloudflare API’siyle otomatikleştirdim.</p><p>Önce bu droplet’in public IP’sini alıyorum — en güvenilir yol DigitalOcean’ın metadata servisi, ulaşılamazsa harici bir servise düşüyorum:</p><pre>PUBLIC_IP=&quot;$(curl -s http://169.254.169.254/metadata/v1/interfaces/public/0/ipv4/address)&quot;<br>[[ -z &quot;$PUBLIC_IP&quot; ]] &amp;&amp; PUBLIC_IP=&quot;$(curl -4 -s icanhazip.com)&quot;</pre><p>Sonra Cloudflare’de A kaydını “varsa güncelle, yoksa oluştur” (upsert) mantığıyla ayarlıyorum. Akış üç adım: zone ID’yi bul → mevcut kaydın ID’sini bul → PUT (güncelle) ya da POST (oluştur).</p><pre># 1) Zone ID<br>zone_id=&quot;$(curl -s &quot;https://api.cloudflare.com/client/v4/zones?name=${CF_ZONE_NAME}&quot; \<br>  -H &quot;Authorization: Bearer ${CF_API_TOKEN}&quot; | jq -r &#39;.result[0].id&#39;)&quot;<br><br># 2) Mevcut A kaydının ID&#39;si (yoksa boş)<br>record_id=&quot;$(curl -s &quot;https://api.cloudflare.com/client/v4/zones/${zone_id}/dns_records?type=A&amp;name=${DOMAIN}&quot; \<br>  -H &quot;Authorization: Bearer ${CF_API_TOKEN}&quot; | jq -r &#39;.result[0].id&#39;)&quot;<br><br># 3) Yük: proxied=false (Let&#39;s Encrypt için gri bulut şart), ttl=120 (hızlı yayılım)<br>payload=&quot;$(jq -n --arg name &quot;$DOMAIN&quot; --arg ip &quot;$PUBLIC_IP&quot; \<br>  &#39;{type:&quot;A&quot;, name:$name, content:$ip, ttl:120, proxied:false}&#39;)&quot;</pre><p>İki ayrıntı burada çok öğretici oldu. Birincisi <strong>proxied:false</strong> — kaydı Cloudflare proxy&#39;sinin (turuncu bulut) arkasına koyarsan Let&#39;s Encrypt sunucuya doğrudan ulaşamaz ve doğrulama patlar; sertifika alınana kadar gri bulut şart. İkincisi <strong>ttl:120</strong> — düşük TTL, yeni IP&#39;nin hızlı yayılmasını sağlıyor.</p><p>Kaydı güncelledikten sonra gerçekten yayıldığını doğruluyorum; Cloudflare’in kendi resolver’ına (1.1.1.1) sorup beklediğim IP&#39;yi görene kadar bekliyorum:</p><pre>for i in $(seq 1 30); do<br>  resolved=&quot;$(dig +short &quot;$DOMAIN&quot; @1.1.1.1 | tail -n1)&quot;<br>  [[ &quot;$resolved&quot; == &quot;$PUBLIC_IP&quot; ]] &amp;&amp; break<br>  echo &quot;DNS bekleniyor ($i/30)...&quot;; sleep 10<br>done</pre><p>Böylece “kur → sil → tekrar kur” döngüsü baştan sona otomatik: yeni droplet ayağa kalkıyor, subdomain de yeni IP’ye kendiliğinden bağlanıyor.</p><h3>8. SSL — dayanıklı, webroot yöntemiyle</h3><p>DNS yerine oturunca Let’s Encrypt’ten sertifikayı alıyorum. Burada --nginx eklentisi yerine <strong>webroot</strong> yöntemini kullandım: certbot, doğrulama dosyasını /var/www/html/.well-known/... altına koyuyor, OpenResty de o yolu servis ediyor. Bu, OpenResty gibi standart dışı bir kurulumda daha temiz çalışıyor.</p><pre>apt-get install -y certbot<br>certbot certonly --webroot -w /var/www/html -d &quot;$DOMAIN&quot; -n --agree-tos -m &quot;$EMAIL&quot;</pre><p>Kritik nokta: bu adım başarısız olsa bile script durmuyor. Sertifika gelmezse site HTTP’de kalıyor; gelince tam HTTPS config’ine geçiliyor. Bir de sertifika yenilendiğinde OpenResty’yi otomatik reload eden bir “deploy hook” bırakıyorum, ki 90 günde bir yenileme sessizce devreye girsin:</p><pre># /etc/letsencrypt/renewal-hooks/deploy/reload-openresty.sh<br>#!/bin/bash<br>systemctl reload openresty</pre><h3>9. İki aşamalı config: önce HTTP, sonra tam HTTPS</h3><p>Sunucu, sertifika durumuna göre iki farklı config’den birini kullanıyor.</p><p><strong>HTTP-only config</strong> (sertifika henüz yokken): 80&#39;i dinler, .well-known&#39;ı servis eder ve isteği arkadaki uygulamaya proxy&#39;ler. Sertifika olmasa bile site ayakta.</p><p><strong>Tam config</strong> (sertifika geldikten sonra): 80&#39;i tümüyle HTTPS’e yönlendirir, 443&#39;te SSL + HTTP/2 açar, isteği uygulamaya proxy’ler ve bir de Lua API ucu sunar. Sürdürme başlığı da kapalı:</p><pre>server {<br>    listen 443 ssl;<br>    http2 on;<br>    server_name lab.ornek.com;<br>    server_tokens off;                 # sürüm bilgisini gizle<br><br>    ssl_certificate     /etc/letsencrypt/live/lab.ornek.com/fullchain.pem;<br>    ssl_certificate_key /etc/letsencrypt/live/lab.ornek.com/privkey.pem;<br><br>    location / {<br>        proxy_pass http://127.0.0.1:3000;<br>        proxy_set_header Host $host;<br>        proxy_set_header X-Real-IP $remote_addr;<br>        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;<br>        proxy_set_header X-Forwarded-Proto $scheme;<br>    }<br>}</pre><p>server_tokens off; küçük ama gerçek bir sertleştirme: varsayılan olarak sunucu, yanıt başlıklarında yazılım ve sürüm bilgisini sızdırır ve bu saldırgana ipucu verir. Kapatmak bu tek satır.</p><p>Her config değişikliğinden sonra uygulamadan önce <strong>mutlaka test</strong>: openresty -t &amp;&amp; systemctl reload openresty. Bu alışkanlık, hatalı bir config&#39;in sunucuyu düşürmesini engelliyor.</p><h3>10. Lua ile küçük bir API ucu</h3><p>OpenResty’nin asıl gücünü burada gördüm: proxy’nin yanında, doğrudan sunucu katmanında çalışan minik bir API. /api?a=5&amp;b=3 isteğine JSON dönen, iki sayıyı toplayan bir uç:</p><pre>location /api {<br>    content_by_lua_block {<br>        local cjson = require &quot;cjson&quot;<br>        local args = ngx.req.get_uri_args()<br>        local a = tonumber(args.a)<br>        local b = tonumber(args.b)<br>        ngx.header.content_type = &quot;application/json; charset=utf-8&quot;<br>        if not a or not b then<br>            ngx.status = 400<br>            ngx.say(cjson.encode({ hata = &quot;a ve b sayisal olmali&quot; }))<br>            return<br>        end<br>        ngx.say(cjson.encode({ a = a, b = b, toplam = a + b }))<br>    }<br>}</pre><p>Basit görünüyor ama fikri büyük: isteğin tam ortasına kendi kodunu koyabiliyorsun. Aynı mekanizmayla rate limiting (bir IP’nin dakikada kaç istek atabileceğini sınırlama; lua_shared_dict ile paylaşımlı sayaç), kimlik doğrulama ya da dinamik yönlendirme yazılabiliyor. &quot;İstemci → port → dinleyen program → cevap&quot; döngüsü kafamda tam da burada oturdu.</p><h3>11. Güvenlik: token’ı ciddiye al</h3><p>Bu kurulumun tek hassas noktası Cloudflare token’ı. cloud-init user-data’sı droplet metadata servisi üzerinden okunabildiği ve DigitalOcean’da saklandığı için token orada açık kalıyor. İki kural:</p><ul><li>Token’ı <strong>en dar yetkiyle</strong> oluştur: yalnızca ilgili tek zone için Zone.DNS:Edit. Böylece sızsa bile etki tek domain&#39;in DNS&#39;iyle sınırlı kalır.</li><li>Kurulum bittikten sonra token’ı <strong>iptal edip yenile (rotate)</strong>.</li></ul><p>Token’ı hiçbir zaman herkese açık bir repoya koyma. Sızdıysa beklemeden yenile.</p><h3>Sonuç: en hızlı öğrenme yolu, bizzat kurcalamak</h3><p>Bütün bunları önce elle, adım adım yaptım; script en sonda, öğrendiklerimin özeti olarak çıktı. En çok işe yarayan şey bir özellik değil, bir alışkanlık oldu: <strong>bir şeyi bilerek bozup loglardan (</strong><strong>journalctl -u servis, OpenResty error log) nedenini bulmak.</strong> Bir servis çökünce onu systemctl status ile teşhis etmeyi öğrenmek tek başına çok şey öğretiyor.</p><p>“Bilgisayarımda çalışıyor” ile “sunucuda, production’da çalışıyor” arasındaki farkı ancak bu adımları elle yaşayınca görüyorsun. Sen de öğrenmek istiyorsan tavsiyem net: en küçük droplet’i al, bir subdomain bağla ve bu adımları tek tek kendin yap. Bir şeyleri patlatman normal — öğrenmenin kendisi zaten orada.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d55b261f6371" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How I Set Up Meilisearch on Ubuntu for a Laravel Application — A Production Guide]]></title>
            <link>https://medium.com/@esenabdullahemin/how-i-set-up-meilisearch-on-ubuntu-for-a-laravel-application-a-production-guide-b151a29afa6d?source=rss-b85bc9c3576e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b151a29afa6d</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[ubuntu]]></category>
            <category><![CDATA[meilisearch]]></category>
            <category><![CDATA[search-engines]]></category>
            <dc:creator><![CDATA[Esenabdullahemin]]></dc:creator>
            <pubDate>Mon, 27 Apr 2026 21:26:32 GMT</pubDate>
            <atom:updated>2026-04-27T21:26:32.371Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*M7dabSPtB9VOO7GUDCgwEw.png" /></figure><p><em>Meilisearch v1.42.1 · Ubuntu 20.04/22.04 · Laravel Scout · systemd</em></p><p>After integrating Meilisearch into a production Laravel application, I put together this comprehensive guide covering everything from server preparation to capacity planning. If you’re tired of slow database full-text searches and want lightning-fast, typo-tolerant search for your app, this is for you.</p><h3>Why Meilisearch?</h3><p>Meilisearch is an open-source, blazing-fast search engine written in Rust. Compared to Elasticsearch or Algolia:</p><ul><li><strong>Self-hosted</strong> — full control, no vendor lock-in</li><li><strong>Laravel Scout integration</strong> — drop-in driver, minimal boilerplate</li><li><strong>Typo-tolerant by default</strong> — handles user typos gracefully</li><li><strong>Simple HTTP API</strong> — easy to query and debug</li></ul><h3>Architecture Overview</h3><pre>Laravel App  →  Scout Driver  →  Meilisearch (port 7700)<br>                                      ↕<br>                              /var/lib/meilisearch  (data)<br>                              /etc/meilisearch/config.toml</pre><p>The Meilisearch process runs as a dedicated meili system user under systemd, with config isolated in /etc/meilisearch/.</p><h3>1. Server Preparation</h3><h3>1.1 Install Required Packages</h3><pre>sudo apt update<br>sudo apt install curl wget unzip -y</pre><blockquote><em>⚠️ </em><strong><em>Do NOT run </em></strong><strong><em>apt upgrade</em></strong><em> — it may pull in incompatible PHP packages on shared servers.</em></blockquote><h3>1.2 Create a Dedicated System User</h3><p>Running Meilisearch under its own user is a security best practice. It limits the blast radius if the process is ever compromised.</p><pre>sudo useradd -r -s /bin/false -d /var/lib/meilisearch meili</pre><blockquote><em>⚠️ Skipping this step will prevent the systemd service from starting.</em></blockquote><h3>1.3 Set Up the Data Directory</h3><pre>sudo mkdir -p /var/lib/meilisearch<br>sudo chown -R meili:meili /var/lib/meilisearch<br>sudo chmod 750 /var/lib/meilisearch</pre><h3>2. Installing Meilisearch</h3><h3>2.1 Download the Binary</h3><pre>wget https://github.com/meilisearch/meilisearch/releases/download/v1.42.1/meilisearch-linux-amd64<br>chmod +x meilisearch-linux-amd64<br>sudo mv meilisearch-linux-amd64 /usr/local/bin/meilisearch</pre><pre># Verify<br>meilisearch --version</pre><h3>2.2 Generate a Master Key</h3><p>In production, a master key is <strong>mandatory</strong>. Generate a cryptographically secure one:</p><pre>openssl rand -base64 48</pre><p>Copy the output and store it somewhere safe — you will need it in both config.toml and your Laravel .env.</p><h3>2.3 Create config.toml</h3><p>Using a config file (instead of environment variables) keeps your configuration explicit and version-controllable.</p><pre>sudo mkdir -p /etc/meilisearch<br>sudo nano /etc/meilisearch/config.toml</pre><pre>db_path = &quot;/var/lib/meilisearch&quot;<br>http_addr = &quot;0.0.0.0:7700&quot;<br>master_key = &quot;YOUR_GENERATED_KEY_HERE&quot;<br>env = &quot;production&quot;<br>max_indexing_memory = &quot;1 GiB&quot;</pre><p>Lock down the config file:</p><pre>sudo chown meili:meili /etc/meilisearch/config.toml<br>sudo chmod 600 /etc/meilisearch/config.toml</pre><h3>2.4 Create the systemd Service</h3><pre>sudo nano /etc/systemd/system/meilisearch.service</pre><pre>[Unit]<br>Description=Meilisearch<br>After=network.target</pre><pre>[Service]<br>Type=simple<br>User=meili<br>Group=meili<br>ExecStart=/usr/local/bin/meilisearch --config-file-path /etc/meilisearch/config.toml<br>Restart=on-failure<br>RestartSec=5<br>WorkingDirectory=/var/lib/meilisearch</pre><pre>[Install]<br>WantedBy=multi-user.target</pre><h3>2.5 Enable and Start the Service</h3><pre>sudo systemctl daemon-reload<br>sudo systemctl enable meilisearch<br>sudo systemctl start meilisearch<br>sudo systemctl status meilisearch</pre><p>You should see Active: active (running). If not, inspect logs:</p><pre>sudo journalctl -u meilisearch -n 50 --no-pager</pre><h3>2.6 Verify the Installation</h3><pre># Health check<br>curl http://localhost:7700/health<br># Expected: {&quot;status&quot;:&quot;available&quot;}</pre><pre># Verify master key<br>curl -H &quot;Authorization: Bearer YOUR_MASTER_KEY&quot; <a href="http://localhost:7700/keys">http://localhost:7700/keys</a></pre><h3>3. Laravel Integration (Step by Step)</h3><p>This is the section most guides rush through. Here is everything you need to do in your Laravel project.</p><h3>3.1 Install Required Packages</h3><pre>composer require laravel/scout<br>composer require meilisearch/meilisearch-php http-interop/http-factory-guzzle</pre><p>Publish the Scout config file:</p><pre>php artisan vendor:publish --provider=&quot;Laravel\Scout\ScoutServiceProvider&quot;</pre><p>This creates config/scout.php where you can fine-tune Scout behavior per driver.</p><h3>3.2 Configure .env</h3><p>Add these variables to your .env file:</p><pre>SCOUT_DRIVER=meilisearch<br>MEILISEARCH_HOST=http://127.0.0.1:7700<br>MEILISEARCH_KEY=YOUR_GENERATED_KEY_HERE<br>MEILISEARCH_ENABLED=true</pre><p>Setting MEILISEARCH_ENABLED=false at any time will automatically fall back to MySQL-based search — no code changes required. This is useful for quick rollbacks.</p><h3>3.3 Add the Searchable Trait to Your Models</h3><p>For each model you want to make searchable, add the Searchable trait and define what gets indexed.</p><pre>&lt;?php</pre><pre>namespace App\Models;</pre><pre>use Illuminate\Database\Eloquent\Model;<br>use Laravel\Scout\Searchable;</pre><pre>class Article extends Model<br>{<br>    use Searchable;</pre><pre>    /**<br>     * The name of the Meilisearch index for this model.<br>     * Defaults to the model&#39;s table name if omitted.<br>     */<br>    public function searchableAs(): string<br>    {<br>        return &#39;articles&#39;;<br>    }</pre><pre>    /**<br>     * Define which fields get indexed.<br>     * Only include fields you actually want to search on.<br>     * Avoid indexing large text blobs or sensitive data.<br>     */<br>    public function toSearchableArray(): array<br>    {<br>        return [<br>            &#39;id&#39;           =&gt; $this-&gt;id,<br>            &#39;title&#39;        =&gt; $this-&gt;title,<br>            &#39;body&#39;         =&gt; $this-&gt;body,<br>            &#39;author&#39;       =&gt; $this-&gt;author-&gt;name ?? null,<br>            &#39;category&#39;     =&gt; $this-&gt;category-&gt;name ?? null,<br>            &#39;published_at&#39; =&gt; $this-&gt;published_at?-&gt;timestamp,<br>            &#39;status&#39;       =&gt; $this-&gt;status,<br>        ];<br>    }</pre><pre>    /**<br>     * Optional: only index records that meet a condition.<br>     * Records returning false are removed from the index.<br>     */<br>    public function shouldBeSearched(): bool<br>    {<br>        return $this-&gt;status === &#39;published&#39;;<br>    }<br>}</pre><p>Key decisions to make per model:</p><p>Decision Guidance Which fields to index Only fields users will actually search. Avoid binary/blob columns. Relationship data Flatten into the array (e.g. $this-&gt;author-&gt;name). Meilisearch stores flat documents. Timestamps Store as Unix timestamps (integers), not formatted strings — easier to filter and sort. shouldBeSearched() Use to exclude drafts, soft-deleted records, private entries, etc.</p><h3>3.4 Configure Index Settings (The Most Important Step)</h3><p>This is where most guides leave you hanging — and where search quality is actually decided.</p><p>In config/scout.php, add Meilisearch-specific index settings under the meilisearch key:</p><pre>&#39;meilisearch&#39; =&gt; [<br>    &#39;host&#39; =&gt; env(&#39;MEILISEARCH_HOST&#39;, &#39;http://localhost:7700&#39;),<br>    &#39;key&#39;  =&gt; env(&#39;MEILISEARCH_KEY&#39;),<br>    &#39;index-settings&#39; =&gt; [</pre><pre>        // Replace &#39;articles&#39; with your actual index name (matches searchableAs())<br>        &#39;articles&#39; =&gt; [</pre><pre>            // Fields Meilisearch searches across.<br>            // Order matters: fields listed first have higher relevance weight.<br>            &#39;searchableAttributes&#39; =&gt; [<br>                &#39;title&#39;,      // Highest priority — listed first<br>                &#39;author&#39;,<br>                &#39;category&#39;,<br>                &#39;body&#39;,       // Lowest priority — listed last<br>            ],</pre><pre>            // Fields available for filtering via -&gt;where()<br>            &#39;filterableAttributes&#39; =&gt; [<br>                &#39;status&#39;,<br>                &#39;category&#39;,<br>                &#39;published_at&#39;,<br>            ],</pre><pre>            // Fields available for sorting via -&gt;orderBy()<br>            &#39;sortableAttributes&#39; =&gt; [<br>                &#39;published_at&#39;,<br>                &#39;title&#39;,<br>            ],</pre><pre>            // Fields returned in search results<br>            // Omit fields you do not need in the UI to keep responses lean<br>            &#39;displayedAttributes&#39; =&gt; [<br>                &#39;id&#39;,<br>                &#39;title&#39;,<br>                &#39;author&#39;,<br>                &#39;category&#39;,<br>                &#39;published_at&#39;,<br>                &#39;status&#39;,<br>            ],<br>        ],</pre><pre>    ],<br>],</pre><p>After any change to index settings, push them to Meilisearch:</p><pre>php artisan scout:sync-index-settings</pre><p>Run this command every time you edit index settings in config/scout.php.</p><p><strong>Why each setting matters:</strong></p><p>Setting What happens if you skip it searchableAttributes All fields are searched with equal weight — title matches rank the same as body matches filterableAttributes -&gt;where(&#39;status&#39;, &#39;published&#39;) throws an error at query time sortableAttributes -&gt;orderBy(&#39;published_at&#39;, &#39;desc&#39;) throws an error at query time displayedAttributes All indexed fields are returned, including ones you may not want to expose</p><h3>3.5 Keep the Index in Sync Automatically</h3><p>Laravel Scout hooks into Eloquent events automatically. As long as the Searchable trait is on your model, the index is updated on every save(), update(), and delete() — no extra code needed.</p><p>For shouldBeSearched(): if a record transitions from &quot;not searchable&quot; to &quot;searchable&quot; (e.g. a draft is published), Scout adds it to the index on the next save(). If it transitions the other way, Scout removes it.</p><p>One important caveat: <strong>bulk operations via </strong><strong>DB::table() or raw queries do not trigger Eloquent events</strong>, so the index is not updated. In those cases, trigger a re-import manually:</p><pre>php artisan scout:import &quot;App\Models\Article&quot;</pre><h3>3.6 Initial Data Import</h3><p>After setting up your models and index settings, run the first full import:</p><pre>php artisan config:clear &amp;&amp; php artisan cache:clear<br>php artisan scout:sync-index-settings<br>php artisan scout:import &quot;App\Models\Article&quot;<br># Repeat for each searchable model</pre><p>Monitor RAM during the import:</p><pre>watch -n 1 &#39;ps aux | grep meilisearch | grep -v grep | awk &quot;{print \$6/1024 \&quot; MB\&quot;}&quot;&#39;</pre><p>After import, check disk and index statistics:</p><pre>curl -H &quot;Authorization: Bearer YOUR_MASTER_KEY&quot; http://localhost:7700/stats</pre><p>Verify your indexes are present:</p><pre>curl -H &quot;Authorization: Bearer YOUR_MASTER_KEY&quot; &quot;http://localhost:7700/indexes&quot;</pre><h3>3.7 Searching in Your Controllers</h3><p>Basic search:</p><pre>$results = Article::search(&#39;your query&#39;)-&gt;get();</pre><p>With filters:</p><pre>$results = Article::search(&#39;your query&#39;)<br>    -&gt;where(&#39;status&#39;, &#39;published&#39;)<br>    -&gt;where(&#39;category&#39;, &#39;technology&#39;)<br>    -&gt;get();</pre><p>With sorting and pagination:</p><pre>$results = Article::search(&#39;your query&#39;)<br>    -&gt;orderBy(&#39;published_at&#39;, &#39;desc&#39;)<br>    -&gt;paginate(20);</pre><p>Fields used in -&gt;where() must be listed in filterableAttributes. Fields used in -&gt;orderBy() must be listed in sortableAttributes. Both require scout:sync-index-settings to be run after adding them.</p><h3>4. Capacity Planning</h3><p>This is the part most guides skip. Get this wrong and you will have a slow or crashing Meilisearch instance.</p><h3>4.1 The Official Rules (from Meilisearch Docs)</h3><p>Resource Rule <strong>Disk</strong> Minimum 10× the raw dataset size <strong>RAM</strong> More RAM = faster search. Search speed is directly tied to the RAM-to-database-size ratio <strong>CPU</strong> More cores = more concurrent search requests</p><p>Key insight: Meilisearch also uses disk as virtual memory, which allows it to exceed physical RAM limits — but at the cost of search speed.</p><h3>4.2 Understanding max_indexing_memory</h3><p>Property Detail Default 2/3 of available RAM (automatic) When active Only during indexing Effect on search None Precision Soft limit — actual usage may slightly exceed it</p><blockquote><em>⚠️ Never set this equal to or greater than your total RAM — the instance will crash.</em></blockquote><p>Recommended values by server RAM:</p><p>Server RAM max_indexing_memory 2 GB 512 MiB 4 GB 1 GiB 8 GB 2 GiB 16 GB 4 GiB</p><h3>4.3 Optional: Limit RAM via systemd</h3><p>If Meilisearch shares a server with other services, cap its total RAM usage with systemd’s MemoryMax:</p><pre>[Service]<br>...<br>MemoryMax=2G</pre><blockquote><em>⚠️ This is a Linux kernel feature. If the limit is hit, the OS will OOM-kill the process and search will go down. Set it generously.</em></blockquote><h3>4.4 Projection Table</h3><p>Raw Data Min Disk (×10) Recommended RAM ~100 MB ~1 GB 2 GB ~500 MB ~5 GB 4 GB ~1 GB ~10 GB 6 GB ~2 GB ~20 GB 8 GB ~5 GB ~50 GB 16 GB</p><h3>5. Troubleshooting</h3><h3>5.1 API Key Mismatch</h3><p>The key in config.toml and .env must be identical:</p><pre>sudo systemctl restart meilisearch<br>php artisan config:clear</pre><h3>5.2 Filter/Sort Not Working</h3><p>If -&gt;where() or -&gt;orderBy() throws an error, the field is not configured in Meilisearch. Add it to filterableAttributes or sortableAttributes in config/scout.php and run:</p><pre>php artisan scout:sync-index-settings</pre><h3>5.3 Records Missing from Search Results</h3><p>Check shouldBeSearched() on the model — records returning false are excluded. Also confirm the record was saved after Scout was set up. Older records need a manual scout:import.</p><h3>5.4 Disabling Meilisearch (Fallback to MySQL)</h3><pre>MEILISEARCH_ENABLED=false</pre><p>When set to false, the application automatically falls back to MySQL-based search.</p><h3>Quick Reference: Full Setup Checklist</h3><p>Step Command / Action 1. Install packages sudo apt install curl wget unzip -y 2. Create meili user sudo useradd -r -s /bin/false -d /var/lib/meilisearch meili 3. Create data dir sudo mkdir -p /var/lib/meilisearch &amp;&amp; sudo chown -R meili:meili /var/lib/meilisearch 4. Download binary wget → chmod +x → sudo mv to /usr/local/bin/meilisearch 5. Generate master key openssl rand -base64 48 6. Create config.toml db_path, http_addr, master_key, max_indexing_memory 7. Create systemd service ExecStart with --config-file-path 8. Start service systemctl daemon-reload &amp;&amp; enable &amp;&amp; start 9. Open firewall sudo ufw allow 7700 10. Install Scout composer require laravel/scout meilisearch/meilisearch-php 11. Configure .env SCOUT_DRIVER, MEILISEARCH_HOST, MEILISEARCH_KEY 12. Add Searchable trait Add to each model + implement toSearchableArray() 13. Configure index settings searchableAttributes, filterableAttributes, sortableAttributes in config/scout.php 14. Sync index settings php artisan scout:sync-index-settings 15. Import data php artisan scout:import &quot;App\Models\YourModel&quot; 16. Verify curl <a href="http://localhost:7700/indexes">http://localhost:7700/indexes</a></p><h3>Final Thoughts</h3><p>Meilisearch strikes a great balance between power and simplicity. The setup is straightforward, the Laravel Scout integration works out of the box, and the performance improvement over MySQL full-text search is dramatic.</p><p>The things most guides do not cover — and that will bite you in production — are capacity planning (especially the disk ×10 rule), max_indexing_memory tuning, and index settings configuration. Invest a few minutes getting those right upfront and you will have a rock-solid, fast search layer.</p><p><em>Have questions or ran into a different issue during setup? Drop a comment below.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b151a29afa6d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Laravel 9.x in sağladıkları]]></title>
            <link>https://medium.com/@esenabdullahemin/laravel-9-x-in-sa%C4%9Flad%C4%B1klar%C4%B1-27bfb756c886?source=rss-b85bc9c3576e------2</link>
            <guid isPermaLink="false">https://medium.com/p/27bfb756c886</guid>
            <category><![CDATA[laravel-framework]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[software]]></category>
            <category><![CDATA[laravel9]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Esenabdullahemin]]></dc:creator>
            <pubDate>Wed, 14 Dec 2022 07:08:03 GMT</pubDate>
            <atom:updated>2022-12-14T08:11:17.963Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Laravel 9.x’le gelen değişimler</em></p><p>·Swift Mailer artık sürdürülebilir olmadığı için Symfony Mailer’a geçiş yapıldı.</p><p><a href="https://laravel.com/docs/9.x/upgrade#symfony-mailer"><em>Detaylı Bilgi…</em></a></p><p>·Flysystem, Storage tarafından sunulan tüm dosya sistemi etkileşimlerine güç sağlar. Flysystem 3.x’e geçildi.</p><p><a href="https://laravel.com/docs/9.x/upgrade#flysystem-3"><em>Detaylı Bilgi…</em></a></p><p>·<strong><em>Improved Eloquent Accessors / Mutators (Geliştirilmiş Etkili Erişimciler)</em></strong></p><p>Eski kullanımı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*4Woql3Evei9ztjM1uXSkJQ.jpeg" /></figure><p>Yeni Kullanımı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/447/1*hfOUZJlvIXVAJjXG1KfwWA.jpeg" /></figure><p>Örnek:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*QK5unLwigLwjnDckmZj38w.jpeg" /></figure><p>·<strong><em>Enum Eloquent Attribute Casting</em></strong></p><p>Modelinizin $casts özellik dizisinde yayınlamak istediğiniz özniteliği ve sıralamayı belirtebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/349/1*6Yr-Pwef-ACQY9itvFpa0A.jpeg" /></figure><p>Belirttikten sonra Enum’da kullanabilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*mIGjHEsk1BCgELX6kUuoHA.jpeg" /></figure><p>·<strong><em>Implicit Route Bindings With Enums</em></strong></p><p>Laravel 9.x, rota tanımınıza bir Enum yazma yeteneği sunar ve Laravel, rotayı yalnızca bu rota segmenti URI’de geçerli bir Enum değeriyse çağırır. Aksi takdirde, otomatik olarak bir HTTP 404 yanıtı döndürülür.</p><p>Rota tanımlama:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/410/1*46fcdhyjYd7plPoCf-kQCg.jpeg" /></figure><p>Yalnızca {category} rota segmenti meyveler veya insanlar ise çağrılacak bir rota tanımlayabilirsiniz. Aksi takdirde, bir HTTP 404 yanıtı döndürülür:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/626/1*xe034KeoH_3n_supNEVY_A.jpeg" /></figure><p>·<strong><em>Forced Scoping Of Route Bindings</em></strong></p><p>Eski Kullanım:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*aImFD2iV3SxrtWLv6zPBRQ.jpeg" /></figure><p>Yeni Kullanım:</p><p>Artık özel bir anahtar sağlanmadığında bile Laravel’e “alt” bağlamaları kapsama talimatı verebilirsiniz. Bunu yapmak için rotanızı tanımlarken scopeBindings yöntemini çağırabilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/692/1*iB0F2X8m3MU73lMop7iGgw.jpeg" /></figure><p>Veya, tüm rota tanımları grubunun kapsamlı bağlamaları kullanması talimatını verebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*gbte02NUKy_PwS-C8XdAJA.jpeg" /></figure><p>·<strong><em>Controller Route Groups</em></strong></p><p>Artık grup içindeki tüm rotalar için ortak denetleyiciyi tanımlamak üzere controller yöntemini kullanabilirsiniz. Ardından, yolları tanımlarken, yalnızca onların çağırdığı denetleyici yöntemini sağlamanız gerekir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*Uvp3GUjn3jKyqC1Pfsafjg.jpeg" /></figure><p>·<strong><em>Full Text Indexes / Where Clauses</em></strong></p><p>MySQL veya PostgreSQL kullanırken, artık tam metin dizinleri oluşturmak için sütun tanımlarına fullText yöntemi eklenebilir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*AN6rFix4QhgaGmCY1_ucCA.jpeg" /></figure><p>Ayrıca, tam metin dizinlerine sahip sütunlarda bir sorguya tam metin “where” yan tümceleri eklemek için whereFullText ve orWhereFullText yöntemleri kullanılabilir. Bu yöntemler, Laravel tarafından temeldeki veritabanı sistemi için uygun SQL’e dönüştürülecektir. Örneğin, MySQL kullanan uygulamalar için bir MATCH AGAINST yan tümcesi oluşturulur:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/460/1*LLp_z2pZjFaDAAwpvfDYBQ.jpeg" /></figure><p>·<strong><em>Laravel Scout Database Engine</em></strong></p><p>Uygulamanız küçük ve orta ölçekli veritabanlarıyla etkileşime giriyorsa veya hafif bir iş yüküne sahipse, artık Algolia veya MeiliSearch gibi özel bir arama hizmeti yerine Scout’un “veritabanı” motorunu kullanabilirsiniz. Veritabanı motoru, sorgunuz için uygun arama sonuçlarını belirlemek üzere mevcut veritabanınızdaki sonuçları filtrelerken “where like” yan tümcelerini ve tam metin dizinlerini kullanacaktır.</p><p><a href="https://laravel.com/docs/9.x/scout"><em>Detaylı Bilgi…</em></a></p><p>·<strong><em>Rendering Inline Blade Templates</em></strong></p><p>Bazen ham bir Blade şablon dizesini geçerli HTML’ye dönüştürmeniz gerekebilir. Bunu Blade cephesi tarafından sağlanan render yöntemini kullanarak gerçekleştirebilirsiniz. Oluşturma yöntemi, şablona sağlanacak Blade şablon dizesini ve isteğe bağlı bir veri dizisini kabul eder:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*Qg_ZnL7YFDp0DWz83ciizQ.jpeg" /></figure><p>Benzer şekilde, renderComponent yöntemi, bileşen örneğini yönteme geçirerek belirli bir sınıf bileşenini işlemek için kullanılabilir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/1*CCJaUhb0Sxx4gzQcTXj8JA.jpeg" /></figure><p>·<strong><em>Slot Name Shortcut</em></strong></p><p>Laravel’in önceki sürümlerinde, yuva adları, x-slot etiketindeki bir ad özniteliği kullanılarak sağlanıyordu:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/458/1*6zthqSWB9KJqhsdqZI0FbQ.jpeg" /></figure><p>Yeni sürümle bu işlem oldukça kısaldı:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/148/1*eFk4eG7aNp9PULUH6RWlag.jpeg" /></figure><p>·<strong><em>Checked / Selected Blade Directives</em></strong></p><p>Kolaylık sağlamak için, belirli bir HTML onay kutusu girişinin “işaretli” olup olmadığını kolayca belirtmek için artık <a href="http://twitter.com/checked">@checked</a> yönergesini kullanabilirsiniz. Bu yönerge, sağlanan koşul doğru olarak değerlendirilirse kontrol edilerek yankılanır:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/449/1*RW4HQs5iEqKUsrWOxmz6aQ.jpeg" /></figure><p>Benzer şekilde, @selected yönergesi, belirli bir seçim seçeneğinin “seçilmesi” gerekip gerekmediğini belirtmek için kullanılabilir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/695/1*MdFVdRJbxTH1YmehszpNeA.jpeg" /></figure><p>·<strong><em>Bootstrap 5 Pagination Views</em></strong></p><p>App\Providers\AppServiceProvider açıldıktan sonra boot kısmına aşağıdaki kodu yazmamız durumunda Bootstrap Paginatior kullanabiliriz.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*qpGHzmHhmtzqVOZfd2eWIw.jpeg" /></figure><p>·<strong><em>Improved Validation Of Nested Array Data</em></strong></p><p>Bazen, özniteliğe doğrulama kuralları atarken belirli bir iç içe geçmiş dizi öğesinin değerine erişmeniz gerekebilir. Artık bunu Rule::forEach yöntemini kullanarak gerçekleştirebilirsiniz. forEach yöntemi, doğrulama altındaki dizi özniteliğinin her yinelemesi için çağrılacak ve özniteliğin değerini ve açık, tamamen genişletilmiş öznitelik adını alacak bir kapatmayı kabul eder. Kapanış, dizi öğesine atanacak bir dizi kural döndürmelidir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/627/1*JWVnVLF3OWJMQ8zsdqr3mg.jpeg" /></figure><p>·<strong><em>Improved Ignition Exception Page</em></strong></p><p>Spatie tarafından oluşturulan açık kaynaklı istisna hata ayıklama sayfası olan Ignition, sıfırdan yeniden tasarlandı. Yeni, geliştirilmiş Ignition, Laravel 9.x ile birlikte gelir ve açık / koyu temalar, özelleştirilebilir “düzenleyicide aç” işlevi ve daha fazlasını içerir.</p><p>·<strong><em>Improved route:list CLI Output</em></strong></p><p>route:list CLI çıktısı, Laravel 9.x için önemli ölçüde iyileştirildi</p><p>·<strong><em>New Helpers</em></strong></p><p>#str</p><p>str işlevi, verilen dize için yeni bir Illuminate\Support\Stringable örneği döndürür. Bu işlev, Str::of yöntemine eşdeğerdir:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/392/1*VDduxy23y_u8caetrKMmmA.jpeg" /></figure><p>str işlevine herhangi bir argüman sağlanmazsa, işlev bir Illuminate\Support\Str örneğini döndürür:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/381/1*toh4U0wxe2HdgFS_iKuw0Q.jpeg" /></figure><p>#to_route</p><p>to_route işlevi, belirli bir adlandırılmış yol için yönlendirme HTTP yanıtı oluşturarak, yollarınızdan ve denetleyicilerinizden adlandırılmış yollara yeniden yönlendirme yapmak için anlamlı bir yol sağlar:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/409/1*tFQLMA261s3voUlE5QvXUg.jpeg" /></figure><p>Gerekirse, yönlendirmeye atanması gereken HTTP durum kodunu ve herhangi bir ek yanıt başlığını üçüncü ve dördüncü argümanlar olarak to_route yöntemine iletebilirsiniz:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*S6sT-8a27PgORL13UPKR7A.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=27bfb756c886" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>