<?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>Forem: Md A Awal Hadi</title>
    <description>The latest articles on Forem by Md A Awal Hadi (@awalhadi5).</description>
    <link>https://forem.com/awalhadi5</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.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F3407093%2Fb71fa338-fccb-4297-8a41-853627b759ef.jpg</url>
      <title>Forem: Md A Awal Hadi</title>
      <link>https://forem.com/awalhadi5</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/awalhadi5"/>
    <language>en</language>
    <item>
      <title>🚀 Git Tip of the Day: merge vs. pull — Which One Should You Use? 🧠</title>
      <dc:creator>Md A Awal Hadi</dc:creator>
      <pubDate>Mon, 06 Oct 2025 05:32:10 +0000</pubDate>
      <link>https://forem.com/awalhadi5/git-tip-of-the-day-merge-vs-pull-which-one-should-you-use-l0n</link>
      <guid>https://forem.com/awalhadi5/git-tip-of-the-day-merge-vs-pull-which-one-should-you-use-l0n</guid>
      <description>&lt;p&gt;Hey Devs 👋&lt;br&gt;
Ever got confused between &lt;code&gt;git merge&lt;/code&gt; and &lt;code&gt;git pull&lt;/code&gt;? 😵&lt;br&gt;
You’re not alone — this one trips up even experienced developers sometimes!&lt;/p&gt;

&lt;p&gt;Let’s break it down nice and simple 👇&lt;/p&gt;


&lt;h2&gt;
  
  
  🧩 1️⃣ &lt;code&gt;git merge&lt;/code&gt; — combine changes
&lt;/h2&gt;

&lt;p&gt;Think of it like mixing two branches together 🍹&lt;/p&gt;

&lt;p&gt;🔹 You’re in develop&lt;br&gt;
🔹 You finished a feature in &lt;code&gt;feature/menu-module&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;You can do:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git checkout develop
git merge feature/menu-module
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;👉 This combines your feature branch into develop. \&lt;br&gt;
✅ Great for: merging feature → develop (through PR) \&lt;br&gt;
⚠️ But it creates a merge commit in history.&lt;/p&gt;


&lt;h2&gt;
  
  
  🔄 2. &lt;code&gt;git pull&lt;/code&gt;: The Server Sync
&lt;/h2&gt;

&lt;p&gt;&lt;code&gt;git pull&lt;/code&gt; is the "bring me everything from the server" command 🛒. It's actually a convenience command that does &lt;em&gt;two separate&lt;/em&gt; Git operations for you in sequence:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull=git fetch+git merge
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git fetch&lt;/code&gt;: Downloads all the latest changes and commits from the remote repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;code&gt;git merge&lt;/code&gt;: Immediately merges those newly downloaded changes into your current local branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;How It Works&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull origin develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Key Takeaway&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Purpose&lt;/strong&gt;: Updates your local branch with the absolute latest code from the remote repository.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Risk&lt;/strong&gt;: If others have pushed changes while you were working, the automatic merge can sometimes be messy, creating an extra merge commit in your history.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;✅ &lt;strong&gt;Best for&lt;/strong&gt;: Quickly updating your local copy of a branch.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  💡 Pro Tip: Rebase for a Clean History
&lt;/h3&gt;

&lt;p&gt;f you want a &lt;strong&gt;neat, straight commit history&lt;/strong&gt; ✨ that looks like one continuous line of work, you should use the &lt;code&gt;--rebase&lt;/code&gt; option with &lt;code&gt;git pull&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why rebase&lt;/strong&gt;? It takes your local commits and re-applies them on top of the remote changes, avoiding the extra "merge bubble" commits.&lt;/p&gt;

&lt;h4&gt;
  
  
  The Best Way to Update Your Code:
&lt;/h4&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull --rebase origin develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;🧼 Keeps history linear&lt;br&gt;
🙌 Avoids “merge bubble” commits&lt;/p&gt;


&lt;h2&gt;
  
  
  🧠  In Short: &lt;code&gt;merge&lt;/code&gt; vs. &lt;code&gt;pull&lt;/code&gt; Command Guide
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;strong&gt;Task&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Best Command&lt;/strong&gt;&lt;/th&gt;
&lt;th&gt;&lt;strong&gt;Why&lt;/strong&gt;&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Merge feature&lt;/strong&gt; into dev&lt;/td&gt;
&lt;td&gt;
&lt;code&gt;git merge&lt;/code&gt; (or PR merge)&lt;/td&gt;
&lt;td&gt;Controlled, reviewed, and creates a clear merge point.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Update your feature&lt;/strong&gt; with latest dev&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git pull --rebase origin develop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Clean history, avoids unnecessary merge commits.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Get all latest changes&lt;/strong&gt; without merging immediately&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git fetch origin&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Safe &amp;amp; predictable. Lets you inspect changes first.&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;
&lt;strong&gt;Just sync&lt;/strong&gt; your local branch quickly&lt;/td&gt;
&lt;td&gt;&lt;code&gt;git pull origin develop&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Fast, but can leave a messy history.&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;


&lt;h3&gt;
  
  
  🧰 The Professional Team Workflow Cheat Sheet
&lt;/h3&gt;

&lt;p&gt;Follow these steps for a clean, collaborative workflow:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1️⃣ Always start your day with a fetch: Know what's happened on the remote&lt;/strong&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git fetch origin
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;2️⃣ Before pushing your code, update with rebase&lt;/strong&gt;: Ensure your branch is up-to-date and linear.:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git pull --rebase origin develop
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;3️⃣ Push and create your Pull Request (PR) ✅&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;git push origin feature/awesome-update
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;4️⃣ Merge through PR (GitHub/GitLab)&lt;/strong&gt; 🧩&lt;br&gt;
🔒 Safer, reviewed, documented.&lt;/p&gt;

&lt;p&gt;💬 TL;DR&lt;/p&gt;

&lt;p&gt;🧠 &lt;code&gt;merge&lt;/code&gt;  → Combine two lines of code manually or via PR, leaving a new commit. \&lt;br&gt;
🌐 &lt;code&gt;pull&lt;/code&gt; → &lt;code&gt;fetch&lt;/code&gt; + &lt;code&gt;merge&lt;/code&gt; from remote, used for updating your local branch. \&lt;br&gt;
🎯 &lt;strong&gt;Best practice&lt;/strong&gt; → Use PRs for merging features and &lt;code&gt;pull --rebase&lt;/code&gt; for syncing your local work.\&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>git</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Laravel Addressable: Stop Rewriting Address Logic</title>
      <dc:creator>Md A Awal Hadi</dc:creator>
      <pubDate>Sat, 02 Aug 2025 05:38:54 +0000</pubDate>
      <link>https://forem.com/awalhadi5/laravel-addressable-stop-rewriting-address-logic-273p</link>
      <guid>https://forem.com/awalhadi5/laravel-addressable-stop-rewriting-address-logic-273p</guid>
      <description>&lt;h2&gt;
  
  
  Stop Rewriting Address Logic in Laravel — Meet &lt;strong&gt;Addressable&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;em&gt;A reusable, elegant address management system for Laravel apps, powered by a single trait.&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  🚀 Why Use Addressable?
&lt;/h2&gt;

&lt;p&gt;As a Laravel developer, you've probably rewritten country/state/city/zip logic across projects. &lt;strong&gt;Addressable&lt;/strong&gt; puts an end to that repetition with a Laravel-native package.&lt;/p&gt;

&lt;h3&gt;
  
  
  ✅ Feature Highlights
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;🔁 &lt;code&gt;HasAddress&lt;/code&gt; Trait – plug &amp;amp; play address support
&lt;/li&gt;
&lt;li&gt;🌍 Global address handling (no country lock-in)
&lt;/li&gt;
&lt;li&gt;🧩 Polymorphic relationships – attach to any model
&lt;/li&gt;
&lt;li&gt;📦 Composer installation: &lt;code&gt;composer require awalhadi/addressable&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;🧪 Lightweight, clean, Laravel 10+ ready
&lt;/li&gt;
&lt;li&gt;💻 Compatible with Blade, Vue, and Inertia UIs
&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  🧑‍💻 Usage Example
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight php"&gt;&lt;code&gt;&lt;span class="c1"&gt;// In your Eloquent model&lt;/span&gt;
&lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;HasAddress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nc"&gt;Customer&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nc"&gt;Model&lt;/span&gt;
&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kn"&gt;use&lt;/span&gt; &lt;span class="nc"&gt;HasAddress&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Later, in your controllers or services:&lt;/span&gt;
&lt;span class="k"&gt;echo&lt;/span&gt; &lt;span class="nv"&gt;$customer&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;address&lt;/span&gt;&lt;span class="o"&gt;-&amp;gt;&lt;/span&gt;&lt;span class="n"&gt;full_address&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="c1"&gt;// Output: "Paris, Île‑de‑France, France"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Try it now — it takes just a few minutes to standardize address logic across your app.&lt;/p&gt;

&lt;h3&gt;
  
  
  🖼 Sneak-Peek UI Preview
&lt;/h3&gt;

&lt;p&gt;Design a modern address form with cascading dropdowns:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Country (with flag icons)&lt;/li&gt;
&lt;li&gt;State / Region&lt;/li&gt;
&lt;li&gt;City&lt;/li&gt;
&lt;li&gt;Zip Code&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Fully styled using Tailwind‑inspired aesthetics.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔧 Installing &amp;amp; Configuration
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require awalhadi/addressable
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You’ll automatically gain:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A migration for the addresses table&lt;/li&gt;
&lt;li&gt;Methods like $model-&amp;gt;address&lt;/li&gt;
&lt;li&gt;Readable helpers — e.g. $address-&amp;gt;full_address&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Override defaults easily for custom address formats or relationship names.&lt;/p&gt;

&lt;h3&gt;
  
  
  🔍 Real-World Use Cases
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;User shipping/billing addresses (e‑commerce)&lt;/li&gt;
&lt;li&gt;CRM contact management&lt;/li&gt;
&lt;li&gt;Branch or location-based data models&lt;/li&gt;
&lt;li&gt;SaaS/multi‑tenant address handling&lt;/li&gt;
&lt;li&gt;Anywhere you need standardized address architecture&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  🧠 Why I Built It
&lt;/h4&gt;

&lt;p&gt;Over the years, I found myself rewriting address logic in Laravel projects — leading to inconsistent and hard-to-maintain code. Addressable was designed to follow clean architecture practices, reduce friction, and offer elegant reuse. If you value clean code, reusability, and Laravel best practices, this package is for you.&lt;/p&gt;

&lt;h4&gt;
  
  
  📎 Useful Links
&lt;/h4&gt;

&lt;p&gt;GitHub → &lt;a href="//github.com/awalhadi/addressable"&gt;github.com/awalhadi/addressable&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Packagist → &lt;a href="//packagist.org/packages/awalhadi/addressable"&gt;packagist.org/packages/awalhadi/addressable&lt;/a&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  ⭐ Feedback &amp;amp; Contributions Welcome
&lt;/h4&gt;

&lt;p&gt;I’d love to hear your feedback — whether it's a ⭐ on GitHub, a pull request, or new ideas.&lt;br&gt;
Let’s refine address logic together.&lt;/p&gt;

&lt;p&gt;By Awal Hadi&lt;br&gt;
&lt;a href="//github.com/awalhadi"&gt;GitHub&lt;/a&gt; | &lt;a href="https://awalhadi.vercel.app" rel="noopener noreferrer"&gt;Website/Portfolio&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  php #opensource #devtools #laravelpackage #cleanarchitecture
&lt;/h1&gt;




&lt;h3&gt;
  
  
  📣 Where to Share This
&lt;/h3&gt;

&lt;p&gt;Here are recommended platforms to maximize adoption and visibility:&lt;/p&gt;

&lt;h4&gt;
  
  
  👉 Developer-Focused Platforms
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;LinkedIn&lt;/strong&gt; – share your story with a short intro and link&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Dev.to&lt;/strong&gt; – your full article above&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;daily.dev&lt;/strong&gt; – submit in “Showcase your project”&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Hashnode&lt;/strong&gt;, &lt;strong&gt;Reddit/r/laravel&lt;/strong&gt; – target Laravel developers directly&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Laravel News (Community Links)&lt;/strong&gt; – for curated exposure&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  💡 Bonus Ideas
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;Create a short walkthrough &lt;strong&gt;GIF or demo video&lt;/strong&gt; for sharing on &lt;strong&gt;Twitter/X&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Include &lt;strong&gt;Packagist badge&lt;/strong&gt;, &lt;strong&gt;GitHub stars&lt;/strong&gt; badge, and &lt;strong&gt;Laravel blog links&lt;/strong&gt; in your README&lt;/li&gt;
&lt;li&gt;Post in &lt;strong&gt;Laracasts forums&lt;/strong&gt; or &lt;strong&gt;Laravel.io discussions&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Let me know if you’d like a Twitter/X thread, Reddit post draft, or visuals optimized for each platform!&lt;/p&gt;

</description>
      <category>laravel</category>
      <category>addressable</category>
      <category>package</category>
      <category>devtools</category>
    </item>
  </channel>
</rss>
