<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: devTalk</title>
    <description>The latest articles on DEV Community by devTalk (@devtalk94).</description>
    <link>https://dev.to/devtalk94</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3228626%2F5495a7f0-c356-4253-865c-b83286ec1fe4.jpg</url>
      <title>DEV Community: devTalk</title>
      <link>https://dev.to/devtalk94</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/devtalk94"/>
    <language>en</language>
    <item>
      <title>Stop repeating your where() clauses in Laravel 🔁</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Thu, 13 Aug 2026 13:06:14 +0000</pubDate>
      <link>https://dev.to/devtalk94/stop-repeating-your-where-clauses-in-laravel-5169</link>
      <guid>https://dev.to/devtalk94/stop-repeating-your-where-clauses-in-laravel-5169</guid>
      <description>&lt;p&gt;If you've ever needed multiple aggregate queries (count, sum, avg) on the same filtered data, you've probably copy-pasted the same where() chain over and over.&lt;/p&gt;

&lt;p&gt;The problem? Laravel's query builder is mutable. Once you run one query, chaining more methods onto it doesn't give you a "fresh" copy of your filters.&lt;/p&gt;

&lt;p&gt;The fix: PHP's clone keyword.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nv"&gt;$query&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;Event&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'status'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'created_at'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'&amp;gt;='&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nf"&gt;now&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;subDays&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="mi"&gt;30&lt;/span&gt;&lt;span class="p"&gt;));&lt;/span&gt;

&lt;span class="nv"&gt;$totalCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;clone&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nb"&gt;count&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;

&lt;span class="nv"&gt;$groupedCount&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;clone&lt;/span&gt; &lt;span class="nv"&gt;$query&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;selectRaw&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'count(*) as count'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;groupBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'event'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Same filters, zero repetition, no leftover state messing up your results.&lt;/p&gt;

&lt;p&gt;Small trick, but it keeps analytics/reporting code a lot cleaner. &lt;/p&gt;

&lt;p&gt;Full write-up with more examples 👇&lt;br&gt;
&lt;a href="https://dev-talk.com/post/stop-repeating-your-where-clauses-use-clone-for-multiple-aggregates-in-laravel" rel="noopener noreferrer"&gt;Read Article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>webdev</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>🚀 Laravel 13.24 Added a Small Rule That Solves a Really Common API Headache</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Thu, 13 Aug 2026 02:50:24 +0000</pubDate>
      <link>https://dev.to/devtalk94/laravel-1324-added-a-small-rule-that-solves-a-really-common-api-headache-52e3</link>
      <guid>https://dev.to/devtalk94/laravel-1324-added-a-small-rule-that-solves-a-really-common-api-headache-52e3</guid>
      <description>&lt;p&gt;Ever had a client send extra, unexpected keys inside a filter or settings array? A typo, stale frontend field, or someone poking at your validation?&lt;/p&gt;

&lt;p&gt;Laravel finally has a clean, built-in way to lock this down: Rule::arrayKeys().&lt;/p&gt;

&lt;p&gt;'filter' =&amp;gt; Rule::arrayKeys([&lt;br&gt;
    'status',&lt;br&gt;
    'author',&lt;br&gt;
    'tag',&lt;br&gt;
]),&lt;/p&gt;

&lt;p&gt;Send anything outside status, author, or tag, and validation fails — with a message that actually tells you what went wrong (not just a vague "must be an array").&lt;/p&gt;

&lt;p&gt;In the article I cover:&lt;br&gt;
🔹 How array_keys differs from the old array:key1,key2 syntax (and why the old error messages were misleading)&lt;br&gt;
🔹 Pairing it with required_array_keys() when some keys must be present&lt;br&gt;
🔹 Using the :unexpected placeholder for genuinely helpful error responses&lt;br&gt;
🔹 A full real-world example validating an API filter payload&lt;/p&gt;

&lt;p&gt;No more writing custom Rule classes just to check array shapes. &lt;/p&gt;

&lt;p&gt;Full writeup + code here: &lt;a href="https://dev-talk.com/post/laravel-array-keys-validation-rule-stop-accepting-unexpected-array-data" rel="noopener noreferrer"&gt;Link&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What's your go-to approach for validating nested array payloads in Laravel? Curious if anyone's been doing this a different way.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>api</category>
      <category>webdev</category>
      <category>php</category>
    </item>
    <item>
      <title>Argon2 vs Bcrypt: The Modern Standard for Secure Passwords</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Tue, 11 Aug 2026 14:24:45 +0000</pubDate>
      <link>https://dev.to/devtalk94/argon2-vs-bcrypt-the-modern-standard-for-secure-passwords-13l5</link>
      <guid>https://dev.to/devtalk94/argon2-vs-bcrypt-the-modern-standard-for-secure-passwords-13l5</guid>
      <description>&lt;p&gt;Password hashing is one of those "everyone knows it matters, nobody wants to research it at midnight" topics. This post breaks down Bcrypt vs Argon2 in plain English — no crypto degree required — and gives you a clear answer on which one to use in 2026, plus a zero-downtime migration path if you're still on Bcrypt.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/argon2-vs-bcrypt-the-modern-standard-for-secure-passwords" rel="noopener noreferrer"&gt;Read full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>security</category>
      <category>webdev</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Preventing Password Reuse in Laravel 🔐</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Thu, 30 Jul 2026 16:16:08 +0000</pubDate>
      <link>https://dev.to/devtalk94/preventing-password-reuse-in-laravel-513i</link>
      <guid>https://dev.to/devtalk94/preventing-password-reuse-in-laravel-513i</guid>
      <description>&lt;p&gt;Wrote up how I built &lt;a href="https://github.com/DasunMuthuruwan/laravel-password-history" rel="noopener noreferrer"&gt;&lt;code&gt;laravel-password-history&lt;/code&gt;&lt;/a&gt; — a Composer package that stops users from recycling old passwords, using a polymorphic history table so it works with any Eloquent model, not just &lt;code&gt;User&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Covers the validation rule, the auto-pruning logic, a scheduled cleanup command, and a service-provider bug I ran into (translations silently failing outside the console context).&lt;/p&gt;

&lt;p&gt;📖 Full post: &lt;a href="https://dev-talk.com/post/preventing-password-reuse-in-laravel-building-a-password-history-package" rel="noopener noreferrer"&gt;Article&lt;/a&gt;&lt;br&gt;
📦 &lt;code&gt;composer require devdasun/password-history&lt;/code&gt;&lt;br&gt;
🔗 &lt;a href="https://github.com/DasunMuthuruwan/laravel-password-history" rel="noopener noreferrer"&gt;Repo&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Feedback and PRs welcome, especially from anyone using non-standard auth setups.&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>php</category>
      <category>security</category>
      <category>backenddevelopment</category>
    </item>
    <item>
      <title>MySQL WITH Clause &amp; CTEs - A Complete Guide with Examples</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Sat, 06 Jun 2026 11:08:30 +0000</pubDate>
      <link>https://dev.to/devtalk94/mysql-with-clause-ctes-a-complete-guide-with-examples-50ba</link>
      <guid>https://dev.to/devtalk94/mysql-with-clause-ctes-a-complete-guide-with-examples-50ba</guid>
      <description>&lt;h1&gt;
  
  
  Stop Nesting Subqueries — Use CTEs Instead 🧠
&lt;/h1&gt;

&lt;p&gt;Ever written a SQL query so deeply nested you couldn't&lt;br&gt;
remember what the outer SELECT was even doing?&lt;/p&gt;

&lt;p&gt;Yeah. We've all been there.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Common Table Expressions (CTEs)&lt;/strong&gt; — introduced in MySQL 8.0&lt;br&gt;
via the &lt;code&gt;WITH&lt;/code&gt; keyword — are the clean, readable alternative&lt;br&gt;
you've been looking for.&lt;/p&gt;

&lt;h2&gt;
  
  
  What you'll learn in this guide
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;🔹 What a CTE actually is (no fluff)&lt;/li&gt;
&lt;li&gt;🔹 Basic &lt;code&gt;WITH&lt;/code&gt; clause syntax&lt;/li&gt;
&lt;li&gt;🔹 CTEs vs Subqueries — side by side&lt;/li&gt;
&lt;li&gt;🔹 Chaining multiple CTEs in one query&lt;/li&gt;
&lt;li&gt;🔹 &lt;code&gt;WITH RECURSIVE&lt;/code&gt; for hierarchies &amp;amp; org charts&lt;/li&gt;
&lt;li&gt;🔹 Real-world examples: running totals, deduplication, DELETE&lt;/li&gt;
&lt;li&gt;🔹 Pitfalls to avoid (infinite loops, indexing, MySQL version)&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The core idea in 10 seconds
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight sql"&gt;&lt;code&gt;&lt;span class="k"&gt;WITH&lt;/span&gt; &lt;span class="n"&gt;big_orders&lt;/span&gt; &lt;span class="k"&gt;AS&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
    &lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;total_amount&lt;/span&gt;
    &lt;span class="k"&gt;FROM&lt;/span&gt;   &lt;span class="n"&gt;orders&lt;/span&gt;
    &lt;span class="k"&gt;WHERE&lt;/span&gt;  &lt;span class="n"&gt;total_amount&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;500&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt;
&lt;span class="k"&gt;SELECT&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_name&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;order_id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;total_amount&lt;/span&gt;
&lt;span class="k"&gt;FROM&lt;/span&gt;   &lt;span class="n"&gt;big_orders&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;
&lt;span class="k"&gt;JOIN&lt;/span&gt;   &lt;span class="n"&gt;customers&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt; &lt;span class="k"&gt;ON&lt;/span&gt; &lt;span class="k"&gt;c&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="n"&gt;b&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;customer_id&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That's it. You named a query block &lt;code&gt;big_orders&lt;/code&gt; and used it&lt;br&gt;
like a table. No nested mess. No repeated logic.&lt;/p&gt;

&lt;h2&gt;
  
  
  Ready to level up your SQL?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/mysql-with-clause-common-table-expressions-ctes-a-complete-guide" rel="noopener noreferrer"&gt;👉 Read the full guide&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;─────────────────────────────&lt;br&gt;
💬 Do you already use CTEs in your projects?&lt;br&gt;
What's the most complex CTE you've written?&lt;br&gt;
Share it below — let's learn from each other! 👇&lt;br&gt;
─────────────────────────────&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>database</category>
      <category>webdev</category>
      <category>development</category>
    </item>
    <item>
      <title>Redis Is Not Just a Cache — 8 Use Cases With Real Code</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Sun, 24 May 2026 08:56:59 +0000</pubDate>
      <link>https://dev.to/devtalk94/redis-is-not-just-a-cache-8-use-cases-with-real-code-4d9a</link>
      <guid>https://dev.to/devtalk94/redis-is-not-just-a-cache-8-use-cases-with-real-code-4d9a</guid>
      <description>&lt;p&gt;Everyone learns Redis as a cache on day one.&lt;br&gt;
Most developers never go further.&lt;/p&gt;

&lt;p&gt;But here's the truth — the teams building at scale &lt;br&gt;
use Redis for session storage, real-time leaderboards, &lt;br&gt;
distributed locks, AI vector search, and a lot more.&lt;/p&gt;

&lt;p&gt;In this post I break down 8 real Redis use cases &lt;br&gt;
with actual commands and code so you can start &lt;br&gt;
applying them today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;What's inside:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;⚡ 8 production-grade Redis use cases explained clearly&lt;/li&gt;
&lt;li&gt;💻 Real Redis commands for every use case&lt;/li&gt;
&lt;li&gt;🤖 How Redis powers modern AI systems (Redis Iris)&lt;/li&gt;
&lt;li&gt;📊 Quick reference table at the end&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Whether you're a beginner just getting started or &lt;br&gt;
a backend dev looking to level up — this one's for you.&lt;/p&gt;

&lt;p&gt;Drop a ❤️ if you found it useful and comment &lt;br&gt;
which use case surprised you the most 👇&lt;br&gt;
&lt;a href="https://dev-talk.com/post/top-8-redis-use-cases-every-developer-should-know" rel="noopener noreferrer"&gt;READ ARTICLE&lt;/a&gt;&lt;/p&gt;

</description>
      <category>redis</category>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
    </item>
    <item>
      <title>🔍 Struggling with slow search in your app?</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Sun, 17 May 2026 10:44:59 +0000</pubDate>
      <link>https://dev.to/devtalk94/struggling-with-slow-search-in-your-app-3mm8</link>
      <guid>https://dev.to/devtalk94/struggling-with-slow-search-in-your-app-3mm8</guid>
      <description>&lt;p&gt;I just published a beginner-friendly guide on Elasticsearch — &lt;br&gt;
the search engine powering GitHub, Netflix, and Uber.&lt;/p&gt;

&lt;p&gt;Here's what you'll learn in 3 minutes:&lt;/p&gt;

&lt;p&gt;✅ What Elasticsearch is (and when NOT to use it)&lt;br&gt;
✅ Core concepts — Index, Document, Shard, Replica&lt;br&gt;
✅ How to install it locally with Docker in 1 command&lt;br&gt;
✅ Writing your first search query (with fuzzy/typo support!)&lt;br&gt;
✅ Real-world use cases — e-commerce, logs, site search&lt;/p&gt;

&lt;p&gt;💡 The biggest mistake beginners make?&lt;br&gt;
Using Elasticsearch as their primary database. It's not. &lt;br&gt;
Use it alongside PostgreSQL/MySQL — and watch your search fly.&lt;/p&gt;

&lt;p&gt;👇 &lt;a href="https://dev-talk.com/post/elasticsearch-for-beginners-a-simple-guide-to-getting-started" rel="noopener noreferrer"&gt;Full beginner guide here&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Elasticsearch #BackendDevelopment #WebDevelopment
&lt;/h1&gt;

&lt;h1&gt;
  
  
  OpenSource #ELKStack #SearchEngine #Programming #DevCommunity
&lt;/h1&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>softwaredevelopment</category>
      <category>elasticsearch</category>
    </item>
    <item>
      <title>AWK vs MAWK: Differences, Performance &amp; Real-World Examples</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Thu, 14 May 2026 11:35:10 +0000</pubDate>
      <link>https://dev.to/devtalk94/awk-vs-mawk-differences-performance-real-world-examples-4k79</link>
      <guid>https://dev.to/devtalk94/awk-vs-mawk-differences-performance-real-world-examples-4k79</guid>
      <description>&lt;p&gt;TL;DR — There are two popular AWK implementations &lt;br&gt;
on Linux and most developers only know one of them.&lt;/p&gt;

&lt;p&gt;MAWK processes a 500MB file in 3.1 seconds.&lt;br&gt;
GAWK takes 8.4 seconds for the same task.&lt;/p&gt;

&lt;p&gt;Same syntax. No script changes needed.&lt;br&gt;
Just a faster engine under the hood.&lt;/p&gt;

&lt;p&gt;Quick decision rule I now follow:&lt;/p&gt;

&lt;p&gt;→ Start with mawk for speed&lt;br&gt;
→ Switch to gawk only if you need extensions&lt;br&gt;
→ Your scripts stay portable either way&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/awk-vs-mawk-differences-performance-real-world-examples" rel="noopener noreferrer"&gt;Read article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>linux</category>
      <category>bash</category>
      <category>devops</category>
      <category>programming</category>
    </item>
    <item>
      <title>🔥 Laravel devs — stop using DB::enableQueryLog()</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Thu, 14 May 2026 11:31:25 +0000</pubDate>
      <link>https://dev.to/devtalk94/laravel-devs-stop-using-dbenablequerylog-c57</link>
      <guid>https://dev.to/devtalk94/laravel-devs-stop-using-dbenablequerylog-c57</guid>
      <description>&lt;p&gt;I just published a quick but powerful tip that most &lt;br&gt;
Laravel developers overlook completely.&lt;/p&gt;

&lt;p&gt;Did you know Laravel has 6 built-in Eloquent query &lt;br&gt;
debugging methods?&lt;/p&gt;

&lt;p&gt;Most of us write this the hard way:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="no"&gt;DB&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;enableQueryLog&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nv"&gt;$users&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;get&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;span class="nf"&gt;dd&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="no"&gt;DB&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;getQueryLog&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you can just do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="nc"&gt;User&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="nf"&gt;where&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'active'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;orderBy&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="s1"&gt;'created_at'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="s1"&gt;'desc'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="nf"&gt;ddRawSql&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One line. Full raw SQL. No setup. No package needed.&lt;/p&gt;

&lt;p&gt;Here's the full toolkit:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Method&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;dd()&lt;/td&gt;
&lt;td&gt;Dump results and die&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;dump()&lt;/td&gt;
&lt;td&gt;Dump results, continue execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;ddRawSql()&lt;/td&gt;
&lt;td&gt;Full raw SQL with bindings, then die&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;dumpRawSql()&lt;/td&gt;
&lt;td&gt;Full raw SQL, continue execution&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;toSql()&lt;/td&gt;
&lt;td&gt;SQL string with ? placeholders&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;-&amp;gt;getBindings()&lt;/td&gt;
&lt;td&gt;Array of all binding values&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;I covered all 6 methods with real Artisan Tinker &lt;br&gt;
examples in my latest article.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/laravel-sql-query-debugging-dd-and-ddrawsql-tips" rel="noopener noreferrer"&gt;👉 Read it here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Drop a 🔥 if you didn't know about -&amp;gt;ddRawSql()!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>development</category>
      <category>softwaredevelopment</category>
      <category>laravel</category>
    </item>
    <item>
      <title>Struggling with slow MySQL JOIN queries? 🤔</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Sat, 20 Dec 2025 04:49:50 +0000</pubDate>
      <link>https://dev.to/devtalk94/struggling-with-slow-mysql-join-queries-52b4</link>
      <guid>https://dev.to/devtalk94/struggling-with-slow-mysql-join-queries-52b4</guid>
      <description>&lt;p&gt;Most developers rely on MySQL’s optimizer—but what if it chooses the wrong join order?&lt;br&gt;
This article breaks down MySQL STRAIGHT_JOIN, showing how to manually control join execution, reduce scanned rows, and optimize slow queries using clear examples and best practices.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/understanding-mysql-straight-join-a-practical-guide-to-faster-smarter-queries" rel="noopener noreferrer"&gt;👉 Read here&lt;/a&gt;&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>database</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How to Check if a String is Valid JSON in PHP</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Sat, 08 Nov 2025 05:46:49 +0000</pubDate>
      <link>https://dev.to/devtalk94/how-to-check-if-a-string-is-valid-json-in-php-7hp</link>
      <guid>https://dev.to/devtalk94/how-to-check-if-a-string-is-valid-json-in-php-7hp</guid>
      <description>&lt;p&gt;PHP 8.3 introduced json_validate(), a dedicated function that's more efficient for checking JSON than the traditional json_decode()—but only in specific scenarios.&lt;/p&gt;

&lt;p&gt;In my latest article, I break down:&lt;br&gt;
    ✨ The key differences between these two methods&lt;br&gt;
    📊 When to use each for optimal performance&lt;br&gt;
    🚀 How to avoid the common pitfall of parsing JSON twice&lt;/p&gt;

&lt;p&gt;If you work with APIs or data serialization, this is a must-read for writing cleaner, faster code.&lt;br&gt;
&lt;a href="https://dev-talk.com/post/how-to-check-if-a-string-is-valid-json-in-php" rel="noopener noreferrer"&gt;Read the full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>webdev</category>
      <category>programming</category>
      <category>backend</category>
    </item>
    <item>
      <title>JavaScript Objects: The Ultimate Guide You'll Actually Use</title>
      <dc:creator>devTalk</dc:creator>
      <pubDate>Wed, 05 Nov 2025 18:56:50 +0000</pubDate>
      <link>https://dev.to/devtalk94/javascript-objects-the-ultimate-guide-youll-actually-use-4h8f</link>
      <guid>https://dev.to/devtalk94/javascript-objects-the-ultimate-guide-youll-actually-use-4h8f</guid>
      <description>&lt;p&gt;Stop copy-pasting object code you don't understand. Let's build a deep, practical understanding of JavaScript objects together.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://dev-talk.com/post/master-javascript-objects-the-ultimate-es6-guide-for-developers" rel="noopener noreferrer"&gt;Read the full article&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>developers</category>
    </item>
  </channel>
</rss>
