<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>KodeSmart</title>
	<atom:link href="https://kodesmart.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://kodesmart.com/</link>
	<description>#1 guide to Drupal, Wordpress, CSS and Custom Coding Beginner to Pro</description>
	<lastBuildDate>Wed, 12 Aug 2026 18:37:43 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.2</generator>

<image>
	<url>https://kodesmart.com/wp-content/uploads/2014/07/cropped-logo-32x32.jpg</url>
	<title>KodeSmart</title>
	<link>https://kodesmart.com/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>PHP intl-Extension Error for Laravel on Windows</title>
		<link>https://kodesmart.com/tech-stuff/php-intl-extension-error-for-laravel-on-windows/</link>
					<comments>https://kodesmart.com/tech-stuff/php-intl-extension-error-for-laravel-on-windows/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Wed, 12 Aug 2026 18:34:25 +0000</pubDate>
				<category><![CDATA[Tech Stuff]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2249</guid>

					<description><![CDATA[<p>Fixing the &#8220;intl&#8221; PHP Extension Error for Laravel on Windows When spinning up a fresh Laravel project on a local Windows and Apache environment, you might hit a frustrating runtime blocker: RuntimeExceptionvendor\laravel\framework\src\Illuminate\Support\Number.php:476 The &#8220;intl&#8221; PHP extension is required to use the [format] method. Even if you have uncommented the extension inside your php.ini file, Apache [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/tech-stuff/php-intl-extension-error-for-laravel-on-windows/">PHP intl-Extension Error for Laravel on Windows</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<p><style>
        .blog-container {
            max-width: 800px;
            margin: 0 auto;
            background: #ffffff;
            padding: 3rem;
            border-radius: 12px;
            box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
        }
        h1 {
            color: #0f172a;
            font-size: 2.25rem;
            margin-bottom: 1.5rem;
            border-bottom: 2px solid var(--primary-color);
            padding-bottom: 0.5rem;
        }
        h2 {
            color: #1e293b;
            font-size: 1.5rem;
            margin-top: 2rem;
        }
        p {
            margin-bottom: 1.25rem;
        }
        .error-box {
            background-color: #fef2f2;
            border-left: 4px solid #ef4444;
            padding: 1rem;
            margin: 1.5rem 0;
            font-family: monospace;
            color: #991b1b;
            border-radius: 4px;
        }
        ol {
            margin-bottom: 1.5rem;
            padding-left: 1.5rem;
        }
        li {
            margin-bottom: 0.5rem;
        }
        hr {
            border: 0;
            border-top: 1px solid var(--border-color);
            margin: 2rem 0;
        }
    </style></p>
<div class="blog-container">
<h1>Fixing the &#8220;intl&#8221; PHP Extension Error for Laravel on Windows</h1>
<p>When spinning up a fresh Laravel project on a local Windows and Apache environment, you might hit a frustrating runtime blocker:</p>
<div class="error-box">RuntimeException<br />vendor\laravel\framework\src\Illuminate\Support\Number.php:476<br /><br />The &#8220;intl&#8221; PHP extension is required to use the [format] method.</div>
<p>Even if you have uncommented the extension inside your <code>php.ini</code> file, Apache on Windows often fails to load it due to how background services resolve binary system paths and compiled runtime dependencies.</p>
<p>Here are the exact steps to permanently resolve the issue.</p>
<hr />
<h2>Step 1: Add PHP to the System Path Environment Variables</h2>
<p>When Apache runs as a background Windows service, it operates under a restricted system context. Unlike your local user terminal, the background service <strong>cannot read user-level environment variables</strong>. If your PHP directory isn&#8217;t explicitly defined in the machine&#8217;s global system path, Apache cannot trace supporting DLL files.</p>
<ol>
<li>Press the Windows Key, type <strong>Environment Variables</strong>, and select <strong>Edit the system environment variables</strong>.</li>
<li>Click the <strong>Environment Variables&#8230;</strong> button.</li>
<li>Under the bottom box labeled <strong>System variables</strong>, find and select the variable named <code>Path</code>, then click <strong>Edit</strong>.</li>
<li>Click <strong>New</strong> and add your absolute PHP directory path (e.g., <code>C:\php854_full</code>).</li>
<li>Click <strong>OK</strong> on all open dialog boxes to save changes.</li>
</ol>
<h2>Step 2: Copy ICU Runtime Dependencies Directly Into Apache&#8217;s Bin Directory</h2>
<p>Extensions like <code>php_intl.dll</code> are not self-contained; they rely heavily on external ICU runtime library files (such as <code>icudt*.dll</code>, <code>icuin*.dll</code>, and <code>icuuc*.dll</code>) to process localization rules. If Apache fails to trace these binaries during initialization, it aborts loading the module.</p>
<ol>
<li>Navigate to your main PHP installation folder (e.g., <code>C:\php854_full</code>).</li>
<li>Locate <strong>all files starting with <code>icu</code></strong>.</li>
<li>Copy these files and paste them directly into your Apache binary directory: <strong><code>C:\Apache24\bin\</code></strong>.</li>
</ol>
<h2>Step 3: Perform a Full Service Restart</h2>
<p>Because Apache runs as a persistent service, quick reloads or terminal shortcuts can keep cached worker threads alive in memory.</p>
<ol>
<li>Open your Windows <strong>Services</strong> manager by pressing <code>Win + R</code>, typing <code>services.msc</code>, and hitting Enter.</li>
<li>Locate your Apache service instance (e.g., <code>Apache2.4</code>).</li>
<li>Right-click the service and select <strong>Restart</strong> (or stop it completely, wait 3 seconds, and start it back up).</li>
</ol>
<p>With your global system environment configuration updated and core ICU binaries sitting directly inside Apache&#8217;s binary workspace, Laravel will boot cleanly with full support for formatting and localization classes.</p>
</div>
<p><!-- KS AD SPACE --></p>
<div class="lpos fullspan primad ksad"><div class="adsense square_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
		<!-- KS_Square[250] -->
		<ins class="adsbygoogle"
		     style="display:inline-block;width:250px;height:250px"
		     data-ad-client="ca-pub-6704217550431577"
		     data-ad-slot="2704281648"></ins>
		<script>
		(adsbygoogle = window.adsbygoogle || []).push({});
		</script></div><div class="adsense square_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
		<!-- KS_Square_2[250] -->
		<ins class="adsbygoogle"
		     style="display:inline-block;width:250px;height:250px"
		     data-ad-client="ca-pub-6704217550431577"
		     data-ad-slot="4181014840"></ins>
		<script>
		(adsbygoogle = window.adsbygoogle || []).push({});
		</script></div></div>
<p><!-- KS AD SPACE --></p>
<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/tech-stuff/php-intl-extension-error-for-laravel-on-windows/">PHP intl-Extension Error for Laravel on Windows</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/tech-stuff/php-intl-extension-error-for-laravel-on-windows/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Getting Started with Vercel</title>
		<link>https://kodesmart.com/tech-stuff/getting-started-with-vercel/</link>
					<comments>https://kodesmart.com/tech-stuff/getting-started-with-vercel/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Thu, 23 Jul 2026 21:19:02 +0000</pubDate>
				<category><![CDATA[DevTools]]></category>
		<category><![CDATA[Tech Stuff]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2191</guid>

					<description><![CDATA[<p>A Beginner&#8217;s Guide to Hosting and Testing Projects with Vercel If you are stepping into the world of modern web design and front-end development, you have likely heard the name Vercel floating around. At its core, Vercel is a cloud platform specifically built to optimize the deployment experience for front-end developers. Instead of wrestling with [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/tech-stuff/getting-started-with-vercel/">Getting Started with Vercel</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<div style="max-width: 850px; margin: 0 auto; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; color: #111; line-height: 1.6; background-color: #ffffff; padding: 40px; border-radius: 16px; box-shadow: 0 12px 40px rgba(0,0,0,0.08); border: 1px solid #eaeaea;"><!-- Header Section -->
<div style="text-align: center; margin-bottom: 40px;">
<h1 style="font-size: 1.5rem; font-weight: 800; letter-spacing: -0.04em; margin: 0 0 15px 0; color: #000000;">A Beginner&#8217;s Guide to Hosting and Testing Projects with Vercel</h1>
<p style="font-size: 1.15rem; color: #666; max-width: 700px; margin: 0 auto;">If you are stepping into the world of modern web design and front-end development, you have likely heard the name <strong>Vercel</strong> floating around. At its core, Vercel is a cloud platform specifically built to optimize the deployment experience for front-end developers.</p>
</div>
<!-- Intro Paragraph -->
<div style="margin-bottom: 50px;">
<p style="font-size: 1.1rem; color: #444;">Instead of wrestling with complex server configurations, Vercel allows you to focus purely on your code and your users. Whether you are building a simple landing page or a dynamic web application with interactive features like live leaderboards, daily math challenges, and comprehensive quiz libraries, Vercel provides the infrastructure to get your project live on the internet in minutes.</p>
<p><img fetchpriority="high" decoding="async" class="alignnone size-large wp-image-2194" src="https://kodesmart.com/wp-content/uploads/2026/07/Gemini_Generated_Image_f95pcsf95pcsf95p-1024x559.png" alt="" width="720" height="393" /></p>
</div>
<!-- What Vercel Supports Section -->
<h2 style="font-size: 1.8rem; font-weight: bold; margin-bottom: 25px; border-bottom: 2px solid #eaeaea; padding-bottom: 10px;">What Can You Host, Run, and Test on Vercel?</h2>
<p style="font-size: 1.1rem; color: #444; margin-bottom: 30px;">Vercel is designed to be the ultimate home for the modern web. Here is exactly what the platform supports:</p>
<div style="display: flex; gap: 20px; flex-wrap: wrap; margin-bottom: 50px;"><!-- Host Card -->
<div style="flex: 1; min-width: 220px; background-color: #fafafa; padding: 25px; border-radius: 12px; border: 1px solid #eaeaea;">
<h3 style="font-size: 1.3rem; margin: 0 0 10px 0; color: #000;">Hosting</h3>
<p style="font-size: 0.95rem; color: #555; margin: 0;">Natively hosts static websites, SPAs, and Jamstack architectures. It provides first-class support for React, Next.js, Vue, Svelte, Angular, and standard HTML/CSS/JS.</p>
</div>
<!-- Run Card -->
<div style="flex: 1; min-width: 220px; background-color: #fafafa; padding: 25px; border-radius: 12px; border: 1px solid #eaeaea;">
<h3 style="font-size: 1.3rem; margin: 0 0 10px 0; color: #000;">Running</h3>
<p style="font-size: 0.95rem; color: #555; margin: 0;">Runs dynamic backend logic via <strong>Serverless Functions</strong> and <strong>Edge Functions</strong> using Node.js, Python, Go, or Ruby without maintaining a web server.</p>
</div>
<!-- Test Card -->
<div style="flex: 1; min-width: 220px; background-color: #fafafa; padding: 25px; border-radius: 12px; border: 1px solid #eaeaea;">
<h3 style="font-size: 1.3rem; margin: 0 0 10px 0; color: #000;">Testing</h3>
<p style="font-size: 0.95rem; color: #555; margin: 0;">Excels at testing through <strong>Preview Deployments</strong>. Every push generates a unique, live URL to test changes and run QA before hitting production.</p>
</div>
</div>
<!-- Why Programmers Love Vercel Section -->
<h2 style="font-size: 1.8rem; font-weight: bold; margin-bottom: 30px; border-bottom: 2px solid #eaeaea; padding-bottom: 10px;">Why Programmers Love Vercel</h2>
<!-- Point 1 -->
<div style="display: flex; align-items: flex-start; gap: 20px; margin-bottom: 35px;">
<div style="flex-shrink: 0; background-color: #f0f4f8; padding: 15px; border-radius: 50%;"> </div>
<div>
<h3 style="font-size: 1.4rem; margin: 0 0 10px 0; color: #000;">1. The Safest Way to Run Code You Didn’t Write</h3>
<p style="font-size: 1.05rem; color: #444; margin: 0;">In modern development, we rely heavily on third-party libraries and open-source packages. Running unverified code on your local machine or primary production server can introduce severe vulnerabilities. Vercel acts as an impenetrable buffer. Because every branch and pull request automatically generates its own isolated Preview Deployment, you can safely execute, interact with, and review foreign code in a live, sandboxed cloud environment. Your local machine remains secure, and your production environment remains completely untouched.</p>
</div>
</div>
<!-- Point 2 -->
<div style="display: flex; align-items: flex-start; gap: 20px; margin-bottom: 35px;">
<div style="flex-shrink: 0; background-color: #f0f4f8; padding: 15px; border-radius: 50%;"> </div>
<div>
<h3 style="font-size: 1.4rem; margin: 0 0 10px 0; color: #000;">2. A Low-Cost Sandbox Environment</h3>
<p style="font-size: 1.05rem; color: #444; margin: 0;">When you are learning new frameworks, experimenting with API integrations, or building out proof-of-concept projects, the last thing you want is to accidentally rack up a massive cloud computing bill. Vercel provides an incredibly generous &#8220;Hobby&#8221; tier that is completely free. This gives you a risk-free sandbox environment to deploy an unlimited number of personal projects, test serverless functions, and prototype new web designs without any financial barrier to entry.</p>
</div>
</div>
<!-- Point 3 -->
<div style="display: flex; align-items: flex-start; gap: 20px; margin-bottom: 20px;">
<div style="flex-shrink: 0; background-color: #f0f4f8; padding: 15px; border-radius: 50%;"> </div>
<div>
<h3 style="font-size: 1.4rem; margin: 0 0 10px 0; color: #000;">3. Frictionless, Zero-Configuration CI/CD</h3>
<p style="font-size: 1.05rem; color: #444; margin: 0;">Traditionally, getting code from your code editor to a live server required setting up complex Continuous Integration and Continuous Deployment (CI/CD) pipelines. Vercel eliminates this entirely. By simply connecting your GitHub, GitLab, or Bitbucket repository, the platform takes over. It automatically detects the framework you are using, configures the optimal build settings, and deploys your application every time you push code.</p>
</div>
</div>
</div>
<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/tech-stuff/getting-started-with-vercel/">Getting Started with Vercel</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/tech-stuff/getting-started-with-vercel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Master Your PEP Exams with PrepKids</title>
		<link>https://kodesmart.com/uncategorized/master-your-pep-exams-with-prepkids/</link>
					<comments>https://kodesmart.com/uncategorized/master-your-pep-exams-with-prepkids/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Wed, 22 Jul 2026 20:13:53 +0000</pubDate>
				<category><![CDATA[Uncategorized]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2182</guid>

					<description><![CDATA[<p>Master Your PEP Exams with PrepKids Are you feeling the pressure of upcoming PEP exams? You aren&#8217;t alone! Parents and students alike know that exam season can feel overwhelming. But what if studying could feel a little more like a game and a lot less like a chore? Introducing PrepKids.com, the online portal designed to [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/uncategorized/master-your-pep-exams-with-prepkids/">Master Your PEP Exams with PrepKids</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<h1 style="color: #d35400; text-align: center;">Master Your PEP Exams with PrepKids</h1>
<p>Are you feeling the pressure of upcoming PEP exams? You aren&#8217;t alone! Parents and students alike know that exam season can feel overwhelming. But what if studying could feel a little more like a game and a lot less like a chore?</p>
<div style="background-color: #ffe8d6; padding: 20px; border-radius: 8px; margin: 25px 0; border-left: 5px solid #d35400;">
<p style="margin: 0; font-size: 1.1em;">Introducing <a style="color: #d35400; font-weight: bold; text-decoration: none;" href="https://prepkids.com">PrepKids.com</a>, the online portal designed to turn test prep into an engaging, daily routine.</p>
</div>
<h2 style="color: #d35400; margin-top: 30px;">Turn Past Papers into Play</h2>
<p>We know that practicing with <a style="color: #d35400; font-weight: bold;" href="https://prepkids.com/quizzes/library">past papers</a> is the gold standard for success. PrepKids takes those concepts and transforms them into interactive, bite-sized quizzes. No more boring PDFs—just dynamic, fun challenges that help reinforce exactly what you need to know.</p>
<h2 style="color: #d35400; margin-top: 30px;">Why Families Love PrepKids</h2>
<ul style="list-style-type: none; padding: 0;">
<li style="margin-bottom: 15px;"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Daily Challenges:</strong> Get a fresh dose of practice every single day with our <a style="color: #d35400; font-weight: bold;" href="https://prepkids.com/about">Assignment Daily</a> feature.</li>
<li style="margin-bottom: 15px;"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Gamified Learning:</strong> Track your progress, earn badges, and compete on <a style="color: #d35400; font-weight: bold;" href="https://prepkids.com/leaderboard">our leaderboards</a>. Studying suddenly becomes competitive and fun!</li>
<li style="margin-bottom: 15px;"><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2705.png" alt="✅" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Stay on Track:</strong> Explore a wide range of subjects, visit our <a style="color: #d35400; font-weight: bold;" href="https://prepkids.com/courses">course catalog</a> that keep both parents and students organized.</li>
</ul>
<h2 style="color: #d35400; margin-top: 30px;">Ready to Get Started?</h2>
<p>Whether you&#8217;re looking to brush up on a tricky subject or you&#8217;re ready to tackle a full-blown exam simulation, PrepKids has your back. Visit <a style="color: #d35400; font-weight: bold;" href="https://prepkids.com/login">PrepKids.com</a> today and join the community of learners leveling up their grades, one quiz at a time.</p>
<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/uncategorized/master-your-pep-exams-with-prepkids/">Master Your PEP Exams with PrepKids</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/uncategorized/master-your-pep-exams-with-prepkids/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>LinkedIn Premium Offer &#124; expires on Aug 5, 2026</title>
		<link>https://kodesmart.com/tech-stuff/linkedin-premium-offer/</link>
					<comments>https://kodesmart.com/tech-stuff/linkedin-premium-offer/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Wed, 22 Jul 2026 19:58:25 +0000</pubDate>
				<category><![CDATA[Tech Stuff]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2174</guid>

					<description><![CDATA[<p>Level Up Your Career! Ready to make your next big move? I have a free 2-month trial of LinkedIn Premium Career to share with my network. If you are actively job hunting, looking to expand your professional network, or just wanting to up skill, this is a massive game-changer. Here is how Premium gives you the [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/tech-stuff/linkedin-premium-offer/">LinkedIn Premium Offer | expires on Aug 5, 2026</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[
<p class="wp-block-paragraph"></p>



<p><style>       
        .post-card {
            background-color: #ffffff;
            border-radius: 12px;
            box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
            max-width: 550px;
            padding: 32px;
            text-align: left;
            border: 1px solid #e0dfdc;
        }

        .post-header {
            color: #0a66c2;
            font-size: 1.35rem;
            font-weight: 600;
            margin-bottom: 16px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .post-header svg {
            width: 32px;
            height: 32px;
            fill: currentColor;
        }

        .post-intro {
            color: #191919;
            font-size: 1.1rem;
            font-weight: 500;
            margin-bottom: 15px;
            line-height: 1.5;
        }

        .post-body {
            color: #404040;
            font-size: 1rem;
            line-height: 1.6;
            margin-bottom: 20px;
        }

        .benefits-list {
            list-style: none;
            padding: 0;
            margin: 0 0 25px 0;
        }

        .benefits-list li {
            margin-bottom: 12px;
            display: flex;
            align-items: flex-start;
            gap: 10px;
            font-size: 0.95rem;
            color: #191919;
        }

        .benefits-list li strong {
            color: #000000;
        }

        .post-expiration {
            font-size: 0.9rem;
            color: #5e5e5e;
            margin-bottom: 25px;
            background-color: #f8fafd;
            padding: 15px;
            border-radius: 6px;
            border-left: 4px solid #0a66c2;
        }

        .cta-button {
            display: block;
            width: 100%;
            box-sizing: border-box;
            text-align: center;
            background-color: #0a66c2;
            color: #ffffff;
            text-decoration: none;
            padding: 14px 0;
            border-radius: 24px;
            font-weight: 600;
            font-size: 1.1rem;
            transition: background-color 0.2s ease;
        }

        .cta-button:hover {
            background-color: #004182;
        }

        @media (max-width: 480px) {
            .post-card {
                padding: 20px;
            }
        }
.benefits-list {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
    border-top: 1px solid #e0dfdc; /* Adds a top boundary */
}

.benefits-list li {
    padding: 16px 0;
    margin: 0;
    border-bottom: 1px solid #e0dfdc; /* Horizontal separator */
    font-size: 0.95rem;
    color: #404040;
    line-height: 1.5;
}

/* Removes the border from the very last item so it doesn't double up with the next section */
.benefits-list li:last-child {
    border-bottom: none;
    padding-bottom: 0; 
}

.benefits-list li strong {
    color: #000000;
    display: block; /* Stacks the title cleanly above the text */
    margin-bottom: 4px;
    font-size: 1rem;
}
    </style></p>
<div class="post-card">
<div class="post-header">Level Up Your Career!</div>
<div class="post-intro">Ready to make your next big move? I have a free 2-month trial of LinkedIn Premium Career to share with my network. If you are actively job hunting, looking to expand your professional network, or just wanting to up skill, this is a massive game-changer. Here is how Premium gives you the edge:</div>
<ul class="benefits-list">
<li><strong>Direct Access:</strong> Use In-mail credits to message recruiters and hiring managers directly, even if you aren&#8217;t connected.</li>
<li><strong>See Who&#8217;s Looking:</strong> Unlock the full list of who viewed your profile over the last 90 days and turn those views into valuable connections.</li>
<li><strong>Top Applicant Insights:</strong> See exactly how your skills stack up against other candidates applying for the same roles.</li>
<li><strong>Unlimited Upskilling:</strong> Get full access to thousands of expert-led courses on LinkedIn Learning to sharpen your skills.</li>
</ul>
<div class="post-expiration"><strong>Hurry!</strong> This offer expires on Aug 5, 2026 at 12:00 AM (PDT). Terms apply.</div>
<a class="cta-button" href="http://www.linkedin.com/premium/redeem/?upsellOrderOrigin=premium_referrals_default&amp;coupon=xncY8fPGV&amp;customKey=ref_c&amp;redeemTypeV2=REFERRAL_COUPON" target="_blank" rel="noopener noreferrer"> Claim Your Free 2 Months </a></div>
<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/tech-stuff/linkedin-premium-offer/">LinkedIn Premium Offer | expires on Aug 5, 2026</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/tech-stuff/linkedin-premium-offer/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Local testing guide for a React project from GitHub using Visual Studio</title>
		<link>https://kodesmart.com/kode/local-testing-guide-for-a-react-project-from-github-using-visual-studio/</link>
					<comments>https://kodesmart.com/kode/local-testing-guide-for-a-react-project-from-github-using-visual-studio/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Wed, 15 Jul 2026 14:26:02 +0000</pubDate>
				<category><![CDATA[Kode]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2139</guid>

					<description><![CDATA[<p>If you’re new to coding, trying out a React project from GitHub might sound a little tricky—but don’t worry! This tutorial will guide you step by step, showing you exactly how to get the project running on your own computer. We’ll cover the basics like installing the right tools, downloading the project, opening it in [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/kode/local-testing-guide-for-a-react-project-from-github-using-visual-studio/">Local testing guide for a React project from GitHub using Visual Studio</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[








<p><style>
:root {
            --bg-color: #f8fafc;
            --card-bg: #ffffff;
            --text-main: #0f172a;
            --text-muted: #475569;
            --primary: #06b6d4;
            --primary-dark: #0891b2;
            --border: #e2e8f0;
            --code-bg: #1e293b;
            --code-text: #f8fafc;
            --accent-bg: #f0fdfa;
            --accent-border: #99f6e4;
        }        
.container {
            max-width: 1100px;
            margin: 0 auto;
            display: grid;
            grid-template-columns: 1fr;
            gap: 2rem;
        }

        header {
            grid-column: 1 / -1;
            margin-bottom: 1rem;
        }

        header h1 {
            font-size: 2.5rem;
            color: var(--text-main);
            margin-bottom: 0.5rem;
            font-weight: 800;
        }

        header p {
            font-size: 1.1rem;
            color: var(--text-muted);
            max-width: 800px;
        }

        /* Sidebar Quick Links */
        .sidebar {
            background: var(--card-bg);
            padding: 1.5rem;
            border-radius: 12px;
            border: 1px solid var(--border);
            height: fit-content;
            top: 2rem;
        }

        .sidebar h2 {
            font-size: 1.1rem;
            text-transform: uppercase;
            letter-spacing: 0.05em;
            color: var(--text-muted);
            margin-bottom: 1rem;
        }

        .quick-links {
            list-style: none;
        }

        .quick-links li {
            margin-bottom: 0.75rem;
        }

        .quick-links a {
            color: var(--text-muted);
            text-decoration: none;
            font-size: 0.95rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            transition: color 0.2s ease;
        }

        .quick-links a:hover {
            color: var(--primary-dark);
        }

        .quick-links .step-num {
            background: var(--bg-color);
            border: 1px solid var(--border);
            border-radius: 4px;
            padding: 2px 6px;
            font-size: 0.75rem;
            font-weight: bold;
        }

        /* Main Content Steps */
        .content {
            display: flex;
            flex-direction: column;
            gap: 2rem;
        }

        .step-card {
            background: var(--card-bg);
            border: 1px solid var(--border);
            border-radius: 12px;
            padding: 2rem;
            box-shadow: 0 1px 3px rgba(0,0,0,0.05);
            scroll-margin-top: 2rem;
        }

        .step-badge {
            display: inline-block;
            font-size: 0.8rem;
            font-weight: 700;
            text-transform: uppercase;
            color: var(--primary-dark);
            margin-bottom: 0.5rem;
            letter-spacing: 0.05em;
        }

        .step-card h3 {
            font-size: 1.5rem;
            margin-bottom: 1rem;
            display: flex;
            align-items: center;
            gap: 0.7rem;
        }

        .step-card p {
            color: var(--text-muted);
            margin-bottom: 1.25rem;
        }

        .step-card p strong {
            color: var(--text-main);
        }

        code {
            font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
            background: #f1f5f9;
            padding: 0.2rem 0.4rem;
            border-radius: 4px;
            font-size: 0.9em;
            color: #0f172a;
        }

        pre {
            background: var(--code-bg);
            padding: 1rem;
            border-radius: 8px;
            overflow-x: auto;
            margin-bottom: 1.25rem;
        }

        pre code {
            background: transparent;
            padding: 0;
            color: var(--code-text);
        }

        .btn-link {
            display: inline-block;
            background: var(--primary);
            color: white;
            text-decoration: none;
            padding: 0.6rem 1.2rem;
            border-radius: 6px;
            font-weight: 600;
            font-size: 0.95rem;
            transition: background 0.2s ease;
            margin-top: 0.25rem;
        }

        .btn-link:hover {
            background: var(--primary-dark);
        }

        /* Callouts */
        .callout {
            background: var(--accent-bg);
            border-left: 4px solid var(--accent-border);
            padding: 1.25rem;
            border-radius: 0 8px 8px 0;
            margin-top: 1.5rem;
        }

        .callout h4 {
            font-size: 1rem;
            margin-bottom: 0.25rem;
            color: #115e59;
        }

        .callout p {
            margin-bottom: 0;
            font-size: 0.95rem;
            color: #115e59;
        }
 </style></p>
<p>If you’re new to coding, trying out a React project from GitHub might sound a little tricky—but don’t worry! This tutorial will guide you step by step, showing you exactly how to get the project running on your own computer. We’ll cover the basics like installing the right tools, downloading the project, opening it in Visual Studio Code, and running it so you can see it in your browser. By the end, you’ll have a React app working locally and you’ll feel more confident exploring other projects online.</p>
<div class="container"><header>
<h1>Beginner’s Guide to Running a React Project Locally</h1>
<p>If you’re new to coding, trying out a React project from GitHub might sound a little tricky—but don’t worry! This tutorial will guide you step by step, showing you exactly how to get the project running on your own computer.</p>
</header><!-- Sidebar Navigation Checklist -->
<aside class="sidebar">
<h2>Checklist</h2>
<ul class="quick-links">
<li><a href="#step1"><span class="step-num">1</span> Node.js</a></li>
<li><a href="#step2"><span class="step-num">2</span> Get Code</a></li>
<li><a href="#step3"><span class="step-num">3</span> VS Code</a></li>
<li><a href="#step4"><span class="step-num">4</span> Terminal</a></li>
<li><a href="#step5"><span class="step-num">5</span> Dependencies</a></li>
<li><a href="#step6"><span class="step-num">6</span> Start Server</a></li>
<li><a href="#step7"><span class="step-num">7</span> View Live</a></li>
</ul>
</aside>
<!-- Main Step Instructions --><main class="content">
<section id="step1" class="step-card"><span class="step-badge">Required Environment</span>
<h3>1. Install Node.js</h3>
<p>Think of <strong>Node.js</strong> as the engine that lets you run JavaScript code on your computer instead of just inside a web browser. React projects rely on it to build and manage tools. Running the installer will also automatically install <strong>npm</strong> (Node Package Manager).</p>
<a class="btn-link" href="https://nodejs.org/en/download" target="_blank" rel="noopener">Download Node.js</a></section>
<section id="step2" class="step-card"><span class="step-badge">Download &amp; Extract</span>
<h3>2. Get the Code from GitHub</h3>
<p>Navigate to the GitHub page of the project you want to try. Click the green <strong>Code</strong> button near the top right, and select <strong>Download ZIP</strong>. Once it finishes downloading, locate the ZIP file on your computer and extract (unzip) it into a folder where you like to keep your projects.</p>
</section>
<section id="step3" class="step-card"><span class="step-badge">Your Code Editor</span>
<h3>3. Open the Folder in VS Code</h3>
<p>Open <strong>Visual Studio Code</strong>. Go to the top menu and select <strong>File &gt; Open Folder</strong>. Navigate to the unzipped folder you just created and select it. You should see the project files (like package.json, src, and public) appear in the left-hand sidebar.</p>
</section>
<section id="step4" class="step-card"><span class="step-badge">Command Line Basics</span>
<h3>4. Open the Integrated Terminal</h3>
<p>Instead of opening a separate command prompt, you can use the terminal built right into VS Code. Go to the top menu and click <strong>Terminal &gt; New Terminal</strong>. A panel will slide up showing that you are successfully standing inside your project&#8217;s exact folder.</p>
</section>
<section id="step5" class="step-card"><span class="step-badge">npm install</span>
<h3>5. Install the Dependencies</h3>
<p>React applications use a lot of tiny helper libraries (dependencies). Rather than bundling thousands of files into GitHub, the project author leaves a shopping list called <code>package.json</code>.</p>
<p>In your terminal, type the following command and hit Enter:</p>
<pre><code>npm install</code></pre>
<p>This reads that shopping list and downloads everything into a new folder called <code>node_modules</code>.</p>
<div class="callout">
<h4>What is Node_Modules?</h4>
<p>After running this command, you&#8217;ll see a massive folder appear. Never edit files in here! This is just the engine room where npm stores the libraries required to make your app run.</p>
</div>
</section>
<section id="step6" class="step-card"><span class="step-badge">npm run dev</span>
<h3>6. Launch the Development Server</h3>
<p>Now that the parts are downloaded, it&#8217;s time to turn it on. Look inside your <code>package.json</code> file under the <code>"scripts"</code> section to see how to start it. Modern React projects usually use one of two commands. Type this into your terminal and press Enter:</p>
<pre><code>npm run dev</code></pre>
<p><em>(Note: If the project is a bit older, try <code>npm start</code> instead).</em></p>
</section>
<section id="step7" class="step-card"><span class="step-badge">Localhost</span>
<h3>7. View Your App Live</h3>
<p>Once the terminal says the server is running, open your web browser and navigate to the address shown, typically <strong>http://localhost:5173</strong> or <strong>http://localhost:3000</strong>.</p>
<p>Any changes you make to the code in VS Code will instantly update right here in the browser!</p>
<div class="callout" style="--accent-bg: #f8fafc; --accent-border: #cbd5e1;">
<h4>Pro Tip: How to Stop the App</h4>
<p style="color: var(--text-muted);">When you are done exploring, go to your VS Code terminal and press <strong>Ctrl + C</strong> to safely shut down the server.</p>
</div>
</section>
</main></div>


<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/kode/local-testing-guide-for-a-react-project-from-github-using-visual-studio/">Local testing guide for a React project from GitHub using Visual Studio</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/kode/local-testing-guide-for-a-react-project-from-github-using-visual-studio/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Block route by IP address in Laravel</title>
		<link>https://kodesmart.com/laravel/block-route-by-ip-address-in-laravel/</link>
					<comments>https://kodesmart.com/laravel/block-route-by-ip-address-in-laravel/#respond</comments>
		
		<dc:creator><![CDATA[Kodesmart]]></dc:creator>
		<pubDate>Fri, 31 Jan 2025 18:47:55 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://kodesmart.com/?p=2131</guid>

					<description><![CDATA[<p>In Laravel, using middleware, you can block access to a specific route by IP address. Middleware allows you to filter HTTP requests entering your application. Here&#8217;s how you can do it step by step: Step 1: Create a Middleware Run the following Artisan command to create a new middleware: php artisan make:middleware IPBlockerMiddleware This will [&#8230;]</p>
<p>The post <a href="https://kodesmart.com/laravel/block-route-by-ip-address-in-laravel/">Block route by IP address in Laravel</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></description>
										<content:encoded><![CDATA[




<div class="ds-markdown ds-markdown--block" style="--ds-md-zoom: 1.143;">
<p>In Laravel, using middleware, you can block access to a specific route by IP address. Middleware allows you to filter HTTP requests entering your application. Here&#8217;s how you can do it step by step:</p>
<hr />
<h3><strong>Step 1: Create a Middleware</strong></h3>
<p>Run the following Artisan command to create a new middleware:</p>
<div class="md-code-block">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner">
<div class="md-code-block-action">
<div class="ds-markdown-code-copy-button"><span style="color: #1e1e1e; font-family: Menlo, Consolas, monaco, monospace; font-size: 15px; white-space-collapse: preserve;">php artisan make:middleware IPBlockerMiddleware</span></div>
</div>
</div>
</div>
</div>
<p>This will create a new middleware file in <em>app/Http/Middleware/IPBlockerMiddleware.php</em>.</p>
<hr />
<h3><strong>Step 2: Implement IP Blocking Logic</strong></h3>
<p>Open the newly created middleware file (<em>IPBlockerpMiddleware.php</em>) and add the logic to block specific IP addresses.</p>
<div class="md-code-block">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner">
<div class="md-code-block-action">
<div class="ds-markdown-code-copy-button"><span style="color: #1e1e1e; font-family: Menlo, Consolas, monaco, monospace; font-size: 15px; white-space-collapse: preserve;">&lt;?php</span></div>
</div>
</div>
</div>
<pre><span class="token php language-php"><span class="token keyword">namespace</span> <span class="token package">App<span class="token punctuation">\</span>Http<span class="token punctuation">\</span>Middleware</span><span class="token punctuation">;</span>

<span class="token keyword">use</span> <span class="token package">Closure</span><span class="token punctuation">;</span>
<span class="token keyword">use</span> <span class="token package">Illuminate<span class="token punctuation">\</span>Http<span class="token punctuation">\</span>Request</span><span class="token punctuation">;</span>

<span class="token keyword">class</span> IP<span class="token class-name-definition class-name">BlockerMiddleware</span>
<span class="token punctuation">{</span>
    <span class="token comment">// List of blocked IP addresses</span>
    <span class="token keyword">private</span> <span class="token variable">$blockedIPs</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
        <span class="token string single-quoted-string">'192.168.1.100'</span><span class="token punctuation">,</span> <span class="token comment">// Example IP to block</span>
        <span class="token string single-quoted-string">'192.168.1.101'</span><span class="token punctuation">,</span> <span class="token comment">// Another example IP</span>
    <span class="token punctuation">]</span><span class="token punctuation">;</span>

    <span class="token comment">/**
     * Handle an incoming request.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \Closure  $next
     * @return mixed
     */</span>
    <span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function-definition function">handle</span><span class="token punctuation">(</span><span class="token class-name type-declaration">Request</span> <span class="token variable">$request</span><span class="token punctuation">,</span> <span class="token class-name type-declaration">Closure</span> <span class="token variable">$next</span><span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
        <span class="token comment">// Get the client's IP address</span>
        <span class="token variable">$clientIP</span> <span class="token operator">=</span> <span class="token variable">$request</span><span class="token operator">-&gt;</span><span class="token function">ip</span><span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

        <span class="token comment">// Check if the client's IP is in the blocked list</span>
        <span class="token keyword">if</span> <span class="token punctuation">(</span><span class="token function">in_array</span><span class="token punctuation">(</span><span class="token variable">$clientIP</span><span class="token punctuation">,</span> <span class="token variable">$this</span><span class="token operator">-&gt;</span><span class="token property">blockedIPs</span><span class="token punctuation">)</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
            <span class="token comment">// Return a 403 Forbidden response</span>
            <span class="token keyword">return</span> <span class="token function">response</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'Access Denied'</span><span class="token punctuation">,</span> <span class="token number">403</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
        <span class="token punctuation">}</span>

        <span class="token comment">// Allow the request to proceed</span>
        <span class="token keyword">return</span> <span class="token variable">$next</span><span class="token punctuation">(</span><span class="token variable">$request</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span></span></pre>
</div>
<hr />
<h3><strong>Step 3: Register the Middleware</strong></h3>
<p>Next, register your middleware in <em>app/Http/Kernel.php</em>. Add it to the <em>$routeMiddleware</em> array:</p>
<div class="md-code-block">
<pre><span class="token keyword">protected</span> <span class="token variable">$routeMiddleware</span> <span class="token operator">=</span> <span class="token punctuation">[</span>
    <span class="token comment">// Other middleware</span>
    <span class="token string single-quoted-string">'block.ip'</span> <span class="token operator">=&gt;</span> <span class="token class-name class-name-fully-qualified static-context"><span class="token punctuation">\</span>App<span class="token punctuation">\</span>Http<span class="token punctuation">\</span>Middleware<span class="token punctuation">\IP</span>BlockerMiddleware</span><span class="token operator">::</span><span class="token keyword">class</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">;</span></pre>
</div>
<hr />
<h3><strong>Step 4: Apply the Middleware to Routes</strong></h3>
<p>Now, apply the middleware to the routes you want to protect. You can do this in your <em>routes/web.php</em> or <em>routes/api.php</em> file.</p>
<h4>Example: Block IP for a Specific Route</h4>
<div class="md-code-block">
<pre><span class="token class-name static-context">Route</span><span class="token operator">::</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'/protected-route'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token keyword">return</span> <span class="token string single-quoted-string">'This route is protected!'</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token operator">-&gt;</span><span class="token function">middleware</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'block.ip'</span><span class="token punctuation">)</span><span class="token punctuation">;</span></pre>
</div>
<h4>Example: Block IP for a Group of Routes</h4>
<div class="md-code-block">
<pre><span class="token class-name static-context">Route</span><span class="token operator">::</span><span class="token function">middleware</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'block.ip'</span><span class="token punctuation">)</span><span class="token operator">-&gt;</span><span class="token function">group</span><span class="token punctuation">(</span><span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
    <span class="token class-name static-context">Route</span><span class="token operator">::</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'/protected-route-1'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token string single-quoted-string">'This route is protected!'</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>

    <span class="token class-name static-context">Route</span><span class="token operator">::</span><span class="token function">get</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'/protected-route-2'</span><span class="token punctuation">,</span> <span class="token keyword">function</span> <span class="token punctuation">(</span><span class="token punctuation">)</span> <span class="token punctuation">{</span>
        <span class="token keyword">return</span> <span class="token string single-quoted-string">'This route is also protected!'</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span><span class="token punctuation">)</span><span class="token punctuation">;</span></pre>
</div>
<hr />
<h3><strong>Step 5: Test the Middleware</strong></h3>
<ol start="1">
<li>
<p>Access the protected route from a blocked IP address. You should see a <em>403 Forbidden</em> response.</p>
</li>
<li>
<p>Access the route from an allowed IP address. You should see the route&#8217;s content.</p>
</li>
</ol>
<hr />
<h3><strong>Optional: Dynamically Load Blocked IPs</strong></h3>
<p>If you want to load the blocked IPs dynamically (e.g., from a database or configuration file), you can modify the middleware to fetch the IPs from a source.</p>
<h4>Example: Load Blocked IPs from Config</h4>
<ol start="1">
<li>
<p>Add the blocked IPs to your <em>config/app.php</em> file:</p>
<div class="md-code-block">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner"> </div>
</div>
<pre><span class="token string single-quoted-string">'blocked_ips'</span> <span class="token operator">=&gt;</span> <span class="token punctuation">[</span>
    <span class="token string single-quoted-string">'192.168.1.100'</span><span class="token punctuation">,</span>
    <span class="token string single-quoted-string">'192.168.1.101'</span><span class="token punctuation">,</span>
<span class="token punctuation">]</span><span class="token punctuation">,</span></pre>
</div>
</li>
<li>
<p>Update the middleware to use the config:</p>
<div class="md-code-block">
<div class="md-code-block-banner-wrap">
<div class="md-code-block-banner"> </div>
</div>
<pre><span class="token keyword">private</span> <span class="token variable">$blockedIPs</span><span class="token punctuation">;</span>

<span class="token keyword">public</span> <span class="token keyword">function</span> <span class="token function-definition function">__construct</span><span class="token punctuation">(</span><span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    <span class="token variable">$this</span><span class="token operator">-&gt;</span><span class="token property">blockedIPs</span> <span class="token operator">=</span> <span class="token function">config</span><span class="token punctuation">(</span><span class="token string single-quoted-string">'app.blocked_ips'</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
<span class="token punctuation">}</span></pre>
</div>
</li>
</ol>
<hr />
<h3><strong>Optional: Use a Package</strong></h3>
<p>If you prefer a pre-built solution, you can use a package like <a href="https://github.com/spatie/laravel-ip" target="_blank" rel="noopener noreferrer">spatie/laravel-ip</a> to manage IP blocking.</p>
</div>


<div class="adsense responsive_ad"><script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
				<!-- KS_Banner[468x60] -->
				<ins class="adsbygoogle"
				     style="display:inline-block;width:468px;height:60px"
				     data-ad-client="ca-pub-6704217550431577"
				     data-ad-slot="8750815243"></ins>
				<script>
				(adsbygoogle = window.adsbygoogle || []).push({});
				</script></div><p>The post <a href="https://kodesmart.com/laravel/block-route-by-ip-address-in-laravel/">Block route by IP address in Laravel</a> appeared first on <a href="https://kodesmart.com">KodeSmart</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://kodesmart.com/laravel/block-route-by-ip-address-in-laravel/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
