<?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>PHP Archives - Nikhil Patel</title>
	<atom:link href="https://nikhilpatel.in/category/php/feed/" rel="self" type="application/rss+xml" />
	<link>https://nikhilpatel.in/category/php/</link>
	<description>Tech Tips, Tutorials &#38; Innovation at Your Fingertips.</description>
	<lastBuildDate>Tue, 06 May 2025 04:02:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.1</generator>

<image>
	<url>https://nikhilpatel.in/wp-content/uploads/2021/01/cropped-np500X500-1-32x32.png</url>
	<title>PHP Archives - Nikhil Patel</title>
	<link>https://nikhilpatel.in/category/php/</link>
	<width>32</width>
	<height>32</height>
</image> 
	<item>
		<title>Understanding SOLID Principles in Laravel (with Simple Examples)</title>
		<link>https://nikhilpatel.in/understanding-solid-principles-in-laravel-with-simple-examples/</link>
					<comments>https://nikhilpatel.in/understanding-solid-principles-in-laravel-with-simple-examples/#respond</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Tue, 06 May 2025 04:01:46 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[OOP]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=698</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/understanding-solid-principles-in-laravel-with-simple-examples/">Understanding SOLID Principles in Laravel (with Simple Examples)</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734da7fbc"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row top-level standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p class="" data-start="242" data-end="476">The <strong data-start="246" data-end="266">SOLID principles</strong> are five design principles that help developers write <strong data-start="321" data-end="363">clean, maintainable, and scalable code</strong>. They were introduced by Robert C. Martin (Uncle Bob), and they form the backbone of good software architecture.</p>
<p class="" data-start="478" data-end="561">Let’s break them down with <strong data-start="505" data-end="560">easy-to-understand definitions and Laravel examples</strong>.</p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dba2b9"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">What are SOLID Principles?</h6></div>
		</div>
	</div>
</div><div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>🅢 &#8211; Single Responsibility Principle (SRP)</li>
<li>🅞 &#8211; Open/Closed Principle (OCP)</li>
<li>🅛 &#8211; Liskov Substitution Principle (LSP)</li>
<li>🅘 &#8211; Interface Segregation Principle (ISP)</li>
<li>🅓 &#8211; Dependency Inversion Principle (DIP)</li>
</ul>
 </div>
			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dc4bd0"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Let&#8217;s break them down with <strong>Laravel examples</strong>.</p>
<h4>1&#x20e3; Single Responsibility Principle (SRP)</h4>
<blockquote><p>
<em>&#8220;A class should have only one reason to change.&#8221;</em>
</p></blockquote>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Violation Example</h5>
<p>A <code>UserController</code> handling <strong>authentication, registration, and profile updates</strong>:</p>
<pre><code>class UserController extends Controller {
    public function register(Request $request) { /* ... */ }
    public function login(Request $request) { /* ... */ }
    public function updateProfile(Request $request) { /* ... */ }
    public function deleteAccount(Request $request) { /* ... */ }
}</code></pre>
<p><strong>Problem:</strong></p>
<ul>
<li>If registration logic changes, we risk breaking login/profile updates.</li>
<li>Harder to test and maintain.</li>
</ul>
<h5><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;" /> Solution (SRP in Laravel)</h5>
<p>Split into <strong>dedicated classes</strong>:</p>
<pre><code>class RegistrationController { public function register() { /* ... */ } }
class LoginController { public function login() { /* ... */ } }
class ProfileController { public function update() { /* ... */ } }</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Easier to modify one feature without affecting others.</li>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Better testability.</li>
</ul>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-Life Scenario</h5>
<ul>
<li><strong>Before:</strong> A monolithic <code>OrderController</code> handling payments, shipping, and notifications.</li>
<li><strong>After:</strong> Separate controllers for <code>PaymentService</code>, <code>ShippingService</code>, and <code>NotificationService</code>.</li>
</ul>
<h4>2&#x20e3; Open/Closed Principle (OCP)</h4>
<blockquote><p>
<em>&#8220;Software entities should be open for extension but closed for modification.&#8221;</em>
</p></blockquote>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Violation Example</h5>
<p>A <code>PaymentProcessor</code> with hardcoded payment methods:</p>
<pre><code>class PaymentProcessor {
    public function pay($method) {
        if ($method == 'credit_card') { /* ... */ }
        elseif ($method == 'paypal') { /* ... */ }
    }
}</code></pre>
<p><strong>Problem:</strong></p>
<ul>
<li>Adding a new payment method (e.g., Stripe) requires modifying the class.</li>
</ul>
<h5><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;" /> Solution (OCP in Laravel)</h5>
<p>Use <strong>interfaces and dependency injection</strong>:</p>
<pre><code>interface PaymentMethod { public function pay(); }

class CreditCardPayment implements PaymentMethod { /* ... */ }
class PayPalPayment implements PaymentMethod { /* ... */ }

class PaymentProcessor {
    public function pay(PaymentMethod $method) {
        $method-&gt;pay();
    }
}</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> New payment methods can be added <strong>without changing <code>PaymentProcessor</code></strong>.</li>
</ul>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-Life Scenario</h5>
<ul>
<li><strong>Before:</strong> Hardcoded logic for <code>SMSNotification</code> and <code>EmailNotification</code>.</li>
<li><strong>After:</strong> Extend with <code>SlackNotification</code> without touching existing code.</li>
</ul>
<h4>3&#x20e3; Liskov Substitution Principle (LSP)</h4>
<blockquote><p>
<em>&#8220;Subclasses should be substitutable for their parent classes.&#8221;</em>
</p></blockquote>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Violation Example</h5>
<p>A <code>Bird</code> class with a <code>fly()</code> method, but <code>Penguin</code> can&#8217;t fly:</p>
<pre><code>class Bird { public function fly() { /* ... */ } }
class Penguin extends Bird { /* Can't fly! */ }</code></pre>
<p><strong>Problem:</strong></p>
<ul>
<li><code>Penguin</code> breaks the parent class&#8217;s contract.</li>
</ul>
<h5><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;" /> Solution (LSP in Laravel)</h5>
<p>Use <strong>interfaces</strong> to define behaviors:</p>
<pre><code>interface Flyable { public function fly(); }
class Sparrow implements Flyable { /* ... */ }
class Penguin { /* No fly() method */ }</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Prevents unexpected behavior in child classes.</li>
</ul>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-Life Scenario</h5>
<ul>
<li><strong>Before:</strong> A <code>FileStorage</code> class forcing all subclasses to implement <code>delete()</code>.</li>
<li><strong>After:</strong> <code>ReadOnlyStorage</code> doesn&#8217;t need <code>delete()</code>.</li>
</ul>
<h4>4&#x20e3; Interface Segregation Principle (ISP)</h4>
<blockquote><p>
<em>&#8220;Clients shouldn&#8217;t depend on interfaces they don&#8217;t use.&#8221;</em>
</p></blockquote>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Violation Example</h5>
<p>A bloated <code>Worker</code> interface:</p>
<pre><code>interface Worker {
    public function work();
    public function eat();
    public function sleep();
}

class HumanWorker implements Worker { /* ... */ }
class RobotWorker implements Worker { /* Robots don't eat/sleep! */ }</code></pre>
<p><strong>Problem:</strong></p>
<ul>
<li><code>RobotWorker</code> is forced to implement unnecessary methods.</li>
</ul>
<h5><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;" /> Solution (ISP in Laravel)</h5>
<p>Split into smaller interfaces:</p>
<pre><code>interface Workable { public function work(); }
interface Eatable { public function eat(); }

class HumanWorker implements Workable, Eatable { /* ... */ }
class RobotWorker implements Workable { /* ... */ }</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Cleaner, more focused classes.</li>
</ul>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-Life Scenario</h5>
<ul>
<li><strong>Before:</strong> A <code>NotificationService</code> forcing SMS/Email/Slack in one interface.</li>
<li><strong>After:</strong> Separate <code>SMSNotifiable</code>, <code>EmailNotifiable</code> interfaces.</li>
</ul>
<h4>5&#x20e3; Dependency Inversion Principle (DIP)</h4>
<blockquote><p>
<em>&#8220;Depend on abstractions, not concretions.&#8221;</em>
</p></blockquote>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/274c.png" alt="❌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Violation Example</h5>
<p>A <code>OrderController</code> tightly coupled to <code>StripePayment</code>:</p>
<pre><code>class OrderController {
    public function pay() {
        $payment = new StripePayment();
        $payment-&gt;process();
    }
}</code></pre>
<p><strong>Problem:</strong></p>
<ul>
<li>Switching to PayPal requires rewriting the controller.</li>
</ul>
<h5><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;" /> Solution (DIP in Laravel)</h5>
<p>Use <strong>dependency injection</strong>:</p>
<pre><code>interface PaymentGateway { public function process(); }

class StripePayment implements PaymentGateway { /* ... */ }
class PayPalPayment implements PaymentGateway { /* ... */ }

class OrderController {
    public function pay(PaymentGateway $payment) {
        $payment-&gt;process();
    }
}</code></pre>
<p><strong>Benefits:</strong></p>
<ul>
<li><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/2714.png" alt="✔" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Easily swap payment providers.</li>
</ul>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Real-Life Scenario</h5>
<ul>
<li><strong>Before:</strong> Hardcoded <code>MySQLDatabase</code> dependency.</li>
<li><strong>After:</strong> Switch to <code>PostgreSQLDatabase</code> without code changes.</li>
</ul>
<h4><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Why SOLID Matters in Laravel?</h4>
<ol>
<li><strong>Maintainability:</strong> Easier to update code without breaking things.</li>
<li><strong>Testability:</strong> Isolated components = better unit tests.</li>
<li><strong>Scalability:</strong> New features can be added cleanly.</li>
</ol>
<h5><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4a1.png" alt="💡" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Pro Tip</h5>
<p>Laravel&#8217;s <strong>Service Container</strong> and <strong>Dependency Injection</strong> naturally encourage SOLID principles.</p>
<h4><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4cc.png" alt="📌" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Key Takeaways</h4>
<table>
<tbody>
<tr>
<th>Principle</th>
<th>Laravel Example</th>
<th>Real-World Benefit</th>
</tr>
<tr>
<td><strong>SRP</strong></td>
<td>Split controllers/services</td>
<td>Easier debugging</td>
</tr>
<tr>
<td><strong>OCP</strong></td>
<td>Payment gateways</td>
<td>Extend without modifying</td>
</tr>
<tr>
<td><strong>LSP</strong></td>
<td>Interface inheritance</td>
<td>Safe subclassing</td>
</tr>
<tr>
<td><strong>ISP</strong></td>
<td>Notification channels</td>
<td>No unused methods</td>
</tr>
<tr>
<td><strong>DIP</strong></td>
<td>Dependency injection</td>
<td>Swap implementations easily</td>
</tr>
</tbody>
</table>
<p><strong><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f517.png" alt="🔗" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Next Steps:</strong> Try refactoring a Laravel project using SOLID principles!</p>
<h4><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4ac.png" alt="💬" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Your Turn!</h4>
<p>Which SOLID principle do you find most useful in Laravel? Let&#8217;s discuss in the comments! <img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f447.png" alt="👇" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/understanding-solid-principles-in-laravel-with-simple-examples/">Understanding SOLID Principles in Laravel (with Simple Examples)</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/understanding-solid-principles-in-laravel-with-simple-examples/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Get Started Fast with Laravel Starter Kits: A Game-Changer for Developers</title>
		<link>https://nikhilpatel.in/get-started-fast-with-laravel-starter-kits-a-game-changer-for-developers/</link>
					<comments>https://nikhilpatel.in/get-started-fast-with-laravel-starter-kits-a-game-changer-for-developers/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sun, 02 Mar 2025 05:47:55 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=655</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/get-started-fast-with-laravel-starter-kits-a-game-changer-for-developers/">Get Started Fast with Laravel Starter Kits: A Game-Changer for Developers</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734dd2dc7"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dd30ff"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Hello Folks, Laravel has always been synonymous with elegant syntax and rapid development, and the new Laravel Starter Kits take this to the next level. Designed to drastically cut down your development time, these kits come pre-built with essential features—empowering you to focus on building the unique aspects of your application rather than reinventing the wheel.</p>
<p>In this post, we&#8217;ll dive deep into what Laravel Starter Kits offer, how to install them, and why they&#8217;re an absolute must-have in your developer toolkit.</p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dd34de"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">What Are Laravel Starter Kits?</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>The Laravel Starter Kits are a set of pre-scaffolded packages that include:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li><strong>Full Authentication System</strong>: Pre-built registration, login, and password management.</li>
<li><strong>User Dashboard</strong>: A beautifully designed dashboard ready to display user data.</li>
<li><strong>Profile Settings Page</strong>: Customizable settings for user preferences including theme selection (dark/light mode).</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Available in three distinct flavors—React, Vue, and Livewire—the kits allow you to work with the framework that best fits your project&#8217;s needs or your personal expertise.</p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dd423d"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Why Use Laravel Starter Kits?</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<h4 data-start="1211" data-end="1238"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f680.png" alt="🚀" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Speed Up Development</h4>
<p data-start="1239" data-end="1373">With all core features in place, you can jump straight into adding unique functionalities, significantly reducing your time-to-market.</p>
<h4 data-start="1375" data-end="1409"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f3a8.png" alt="🎨" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Beautiful UI Out-of-the-Box</h4>
<p data-start="1410" data-end="1615">Each kit includes stunning UI components that work seamlessly in both dark and light modes. This means your authentication pages, dashboards, and profile settings not only function well but look fantastic.</p>
<h4 data-start="1617" data-end="1645"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f527.png" alt="🔧" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Framework Flexibility</h4>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li><strong data-start="1648" data-end="1670">React Starter Kit:</strong> Uses React 19, Inertia V2 with TypeScript, and integrates the Shad CN UI Library.</li>
<li><strong data-start="1755" data-end="1775">Vue Starter Kit:</strong> Leverages Vue 3’s composition API with Inertia V2 and is styled with the Vue Shad CN port.</li>
<li><strong data-start="1869" data-end="1894">Livewire Starter Kit:</strong> Built on Livewire V3 with single-file components, styled using Flux UI.</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p data-start="1968" data-end="2061">Choose the flavor that matches your familiarity or the specific requirements of your project.</p>
<h4 data-start="2063" data-end="2098"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f6e0.png" alt="🛠" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Simple Installation Process</h4>
<p data-start="2099" data-end="2296">Each flavor is available as its own GitHub repository. Whether you prefer forking, cloning, or using the streamlined Laravel CLI command, getting started is a breeze. No more tedious manual setups!</p>
<h4 data-start="2298" data-end="2333"><img src="https://s.w.org/images/core/emoji/17.0.2/72x72/1f4f1.png" alt="📱" class="wp-smiley" style="height: 1em; max-height: 1em;" /> Mobile-Responsive by Default</h4>
<p data-start="2334" data-end="2468">All layouts are optimized for responsiveness, ensuring that your application looks great on any device—from desktops to mobile phones.</p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734dd47d1"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img fetchpriority="high" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="871" width="1902" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit.png" alt="" srcset="https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit.png 1902w, https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit-300x137.png 300w, https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit-1024x469.png 1024w, https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit-768x352.png 768w, https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit-1536x703.png 1536w, https://nikhilpatel.in/wp-content/uploads/2025/02/React-starter-kit-600x275.png 600w" sizes="(min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Getting Started: Installation Walkthrough</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<h4 data-start="2521" data-end="2551">Step 1: Choose Your Flavor</h4>
<p data-start="2552" data-end="2742">Before installing, decide whether you&#8217;ll work with React, Vue, or Livewire. If you&#8217;re new or not tied to a specific framework, Livewire might be a great starting point due to its simplicity.</p>
<h4 data-start="2744" data-end="2783">Step 2: Install via the Laravel CLI</h4>
<p data-start="2784" data-end="2862">Ensure you have the Laravel installer added to your machine. Then, simply run:</p>
<p><code>laravel new your-app-name</code></p>
<p data-start="2901" data-end="3041">You&#8217;ll be prompted to select your desired starter kit flavor. Follow the automated instructions, and voilà—you have your project scaffolded!</p>
<p data-start="3043" data-end="3133">Alternatively, if you prefer a manual approach or want to explore the GitHub repositories:</p>
<ul data-start="3134" data-end="3306">
<li data-start="3134" data-end="3190"><strong data-start="3136" data-end="3146">React:</strong> <a href="https://github.com/laravel/react-starter-kit" target="_blank" rel="noopener" data-start="3147" data-end="3190">Laravel Starter Kit &#8211; React Repository</a></li>
<li data-start="3191" data-end="3243"><strong data-start="3193" data-end="3201">Vue:</strong> <a href="https://github.com/laravel/vue-starter-kit" target="_blank" rel="noopener" data-start="3202" data-end="3243">Laravel Starter Kit &#8211; Vue Repository</a></li>
<li data-start="3244" data-end="3306"><strong data-start="3246" data-end="3259">Livewire:</strong> <a href="https://github.com/laravel/livewire-starter-kit" target="_blank" rel="noopener" data-start="3260" data-end="3306">Laravel Starter Kit &#8211; Livewire Repository</a></li>
</ul>
<h4 data-start="3376" data-end="3418">Step 3: Explore the Pre-Built Features</h4>
<p data-start="3419" data-end="3470">After installation, launch your project to explore:</p>
<ul data-start="3471" data-end="3742">
<li data-start="3471" data-end="3555"><strong data-start="3473" data-end="3498">Authentication Pages:</strong> Registration and login screens are ready out-of-the-box.</li>
<li data-start="3556" data-end="3640"><strong data-start="3558" data-end="3577">User Dashboard:</strong> Get a glimpse of a fully functional dashboard upon logging in.</li>
<li data-start="3641" data-end="3742"><strong data-start="3643" data-end="3661">Settings Page:</strong> Update profile details, manage password changes, and switch themes effortlessly.</li>
</ul>
<p>After creating your Laravel application, you only need to install its frontend dependencies via NPM and start the Laravel development server:<br />
<code>cd my-app<br />
npm install &amp;&amp; npm run build<br />
composer run dev</code><br />
Once you have started the Laravel development server, your application will be accessible in your web browser at <a href="http://localhost:8000">http://localhost:8000.</a></p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="873" width="1914" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35.png" alt="Laravel 12 Starter Kit – Login &amp; Registration Page" srcset="https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35.png 1914w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35-300x137.png 300w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35-1024x467.png 1024w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35-768x350.png 768w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35-1536x701.png 1536w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-35-600x274.png 600w" sizes="(min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734de9a0f"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Deep Dive: Customizing the React Starter Kit</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p data-start="3910" data-end="4156">Our React starter kit is built with <strong data-start="3946" data-end="3982">Inertia 2, React 19, Tailwind 4,</strong> and <strong data-start="3987" data-end="4000">shadcn/ui</strong>—providing you with the full backend and frontend code right within your application for complete customization. Here’s how you can make the most out of it:</p>
<h4 data-start="4158" data-end="4179">Project Structure</h4>
<p data-start="4180" data-end="4329">Most of the frontend code is located in the <code data-start="4224" data-end="4238">resources/js</code> directory. This structure is designed to keep your code organized and easily customizable:</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="307" width="800" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2025/02/2025-02-27_00-03.png" alt="" srcset="https://nikhilpatel.in/wp-content/uploads/2025/02/2025-02-27_00-03.png 800w, https://nikhilpatel.in/wp-content/uploads/2025/02/2025-02-27_00-03-300x115.png 300w, https://nikhilpatel.in/wp-content/uploads/2025/02/2025-02-27_00-03-768x295.png 768w, https://nikhilpatel.in/wp-content/uploads/2025/02/2025-02-27_00-03-600x230.png 600w" sizes="(min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<h4 data-start="4619" data-end="4654">Publishing shadcn/ui Components</h4>
<p data-start="4655" data-end="4758">To publish additional shadcn components, identify the component you need and run the following command:</p>
<p><code>npx shadcn@latest add switch</code></p>
<p>In this example, the <strong data-start="4821" data-end="4831">Switch</strong> component is published to:</p>
<p><code>resources/js/components/ui/switch.tsx</code></p>
<p>You can then use it in your pages like so:<br />
<code>import { Switch } from "@/components/ui/switch"<br />
const MyPage = () =&gt; {<br />
return ();<br />
};<br />
export default MyPage;<br />
</code></p>
<h4>Available Layouts &amp; Customization Options</h4>
<h5>Primary Layouts</h5>
<p>The React starter kit includes two primary layouts:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li data-start="5233" data-end="5274"><strong data-start="5235" data-end="5254">Sidebar Layout:</strong> The default layout.</li>
<li data-start="5275" data-end="5608"><strong data-start="5277" data-end="5295">Header Layout:</strong> Easily switch by modifying the import at the top of your <strong>resources/js/layouts/app-layout.tsx</strong> file:</li>
</ul>
 </div><div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="900" width="1919" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43.png" alt="Laravel Starter Kit Setup – Quick Guide for Developers" srcset="https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43.png 1919w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43-300x141.png 300w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43-1024x480.png 1024w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43-768x360.png 768w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43-1536x720.png 1536w, https://nikhilpatel.in/wp-content/uploads/2025/03/2025-03-02_10-43-600x281.png 600w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><code>// For sidebar layout (default)<br />
import AppLayoutTemplate from '@/layouts/app/app-sidebar-layout';<br />
// For header layout<br />
import AppLayoutTemplate from '@/layouts/app/app-header-layout';<br />
</code></p>
<h4 data-start="5610" data-end="5631">Sidebar Variants</h4>
<p data-start="5632" data-end="5698">Within the sidebar layout, you have three variants to choose from:</p>
<ul data-start="5699" data-end="5763">
<li data-start="5699" data-end="5720"><strong data-start="5701" data-end="5720">Default Sidebar</strong></li>
<li data-start="5721" data-end="5740"><strong data-start="5723" data-end="5740">Inset Variant</strong></li>
<li data-start="5741" data-end="5763"><strong data-start="5743" data-end="5763">Floating Variant</strong></li>
</ul>
<p data-start="5765" data-end="5838">Change the variant in the <i>resources/js/components/app-sidebar.tsx</i> file:</p>
<p>&lt;Sidebar collapsible=&#8221;icon&#8221; variant=&#8221;sidebar&#8221;&gt;<br />
&lt;Sidebar collapsible=&#8221;icon&#8221; variant=&#8221;inset&#8221;&gt;</p>
<p>This flexible structure ensures you can tailor the front end to meet your design and usability needs perfectly.</p>
<h4 data-start="5945" data-end="5985">Authentication Page Layout Variants</h4>
<p data-start="5986" data-end="6068">Authentication pages (login, registration, etc.) also offer three layout variants:</p>
<ul data-start="6069" data-end="6104">
<li data-start="6069" data-end="6081"><strong data-start="6071" data-end="6081">Simple</strong></li>
<li data-start="6082" data-end="6092"><strong data-start="6084" data-end="6092">Card</strong></li>
<li data-start="6093" data-end="6104"><strong data-start="6095" data-end="6104">Split</strong></li>
</ul>
<p data-start="6106" data-end="6221">Switch between these by modifying the layout import at the top of your <code data-start="6177" data-end="6215">resources/js/layouts/auth-layout.tsx</code> file:</p>
<p><code><br />
import AuthLayoutTemplate from '@/layouts/auth/auth-simple-layout';<br />
</code></p>
<p data-start="6303" data-end="6414">This flexible structure ensures you can tailor the front end to meet your design and usability needs perfectly.</p>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
		<div id="fws_6a56734def95c"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Key Insights for Developers</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<ul data-start="6453" data-end="7295">
<li data-start="6453" data-end="6623">
<p data-start="6455" data-end="6623"><strong data-start="6455" data-end="6482">Efficiency at Its Best:</strong><br data-start="6482" data-end="6485" />With core features built-in, Laravel Starter Kits let you focus on adding unique functionality rather than rebuilding common components.</p>
</li>
<li data-start="6625" data-end="6819">
<p data-start="6627" data-end="6819"><strong data-start="6627" data-end="6653">Framework Flexibility:</strong><br data-start="6653" data-end="6656" />Whether you’re a React, Vue, or Livewire fan, there’s a starter kit to suit your preferred stack, boosting productivity by letting you work in your comfort zone.</p>
</li>
<li data-start="6821" data-end="6987">
<p data-start="6823" data-end="6987"><strong data-start="6823" data-end="6853">Streamlined Collaboration:</strong><br data-start="6853" data-end="6856" />Each kit is available on GitHub, making it simple to fork, clone, and collaborate with team members using robust version control.</p>
</li>
<li data-start="6989" data-end="7128">
<p data-start="6991" data-end="7128"><strong data-start="6991" data-end="7015">User-Centric Design:</strong><br data-start="7015" data-end="7018" />Mobile responsiveness and thoughtfully designed dashboards ensure a delightful user experience from day one.</p>
</li>
<li data-start="7130" data-end="7295">
<p data-start="7132" data-end="7295"><strong data-start="7132" data-end="7156">Continuous Learning:</strong><br data-start="7156" data-end="7159" />Check out the accompanying YouTube channel for in-depth walkthroughs and additional tutorials that help you master these starter kits.</p>
</li>
</ul>
	</div>
</div>




			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/get-started-fast-with-laravel-starter-kits-a-game-changer-for-developers/">Get Started Fast with Laravel Starter Kits: A Game-Changer for Developers</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/get-started-fast-with-laravel-starter-kits-a-game-changer-for-developers/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Laravel Performance Optimization: Tips and Techniques</title>
		<link>https://nikhilpatel.in/laravel-performance-optimization-tips-and-techniques/</link>
					<comments>https://nikhilpatel.in/laravel-performance-optimization-tips-and-techniques/#respond</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Mon, 09 Oct 2023 15:56:19 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=555</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/laravel-performance-optimization-tips-and-techniques/">Laravel Performance Optimization: Tips and Techniques</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e0be58"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e104c3" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Hello Folks, When it comes to web development with PHP, Laravel stands out as one of the most popular and powerful frameworks. Laravel&#8217;s elegant syntax, robust features, and active community make it an excellent choice for building web applications. However, as applications grow and become more complex, performance optimization becomes crucial to ensure your Laravel-based projects run smoothly and efficiently.</p>
<p>In this blog post, we&#8217;ll explore various tips and techniques for optimizing the performance of your Laravel applications. Whether you&#8217;re working on a new project or maintaining an existing one, these strategies will help you deliver a faster and more responsive web application.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Database Query Optimisation</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Laravel provides an intuitive and expressive query builder for database interactions. To optimize database performance:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Use Eloquent relationships efficiently.</li>
<li>Minimize the use of the <b>SELECT *</b> statement and fetch only the columns you need.</li>
<li>Utilize indexes for frequently queried columns.</li>
<li>Implement eager loading to reduce the number of database queries.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Caching</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Caching is a powerful technique to reduce database and resource-intensive operations. Laravel supports multiple caching drivers, including Redis and Memcached. Implement caching for:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Frequently accessed data.</li>
<li>Expensive computations or database queries.</li>
<li>HTML fragments and views.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">HTTP Caching</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Leverage HTTP caching mechanisms to reduce server load and improve page load times:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Set appropriate cache headers (e.g., <b>Cache-Control</b>, <b>ETag</b>, <b>Last-Modified</b>) in your responses.</li>
<li>Use the <b>Cache</b> middleware for route caching.</li>
<li>Implement browser caching for static assets.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Optimise Composer Auto loading</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Laravel relies on Composer for package management and auto loading classes. To optimise Composer auto loading:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Run <b>composer dump-autoload &#8211;optimize</b> to generate a more efficient autoloader.</li>
<li>Remove unnecessary or unused dependencies from your <b>composer.json</b> file.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Use Queue Workers</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Offload time-consuming tasks to queue workers to keep your application responsive. Laravel&#8217;s built-in queue system, powered by Redis or other drivers, helps manage tasks efficiently.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Optimise Blade Templates</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Blade is Laravel&#8217;s template engine. To optimise Blade templates:</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Minimize the use of complex logic in views.</li>
<li>Use <b>@include</b> and <b>@stack</b> for code re-usability.</li>
<li>Cache-rendered views when possible.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">minify and Bundle Assets</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Reduce the size and number of HTTP requests by magnifying and bundling JavaScript and CSS assets. Laravel Mix simplifies asset compilation and magnification.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Optimise Images</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Compress and optimise images to reduce page load times. Use tools for image processing within your Laravel application.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Monitor Performance</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Implement application performance monitoring tools such as Laravel Telescope, New Relic, or Blackfire.io to identify and diagnose performance bottlenecks.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Upgrade Laravel and Dependencies</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Regularly update Laravel and its dependencies to benefit from performance improvements, bug fixes, and security updates.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h4 style="color: #ffffff;">Docker in CI/CD</h4></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Docker plays a crucial role in modernizing CI/CD pipelines by providing a consistent and reproducible environment for building, testing, and deploying applications. Here&#8217;s a brief overview of integrating Docker into CI/CD pipelines:</p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Laravel is a fantastic framework for building web applications, and with the right optimization techniques, you can ensure that your Laravel-based projects deliver a fast and responsive user experience. By focusing on database queries, caching, and other performance optimization strategies, you can make your Laravel applications perform at their best.</p>
<p>Remember that performance optimization is an ongoing process. Continuously monitor your application, identify bottlenecks, and implement improvements to keep your Laravel projects running smoothly and efficiently.</p>
<p>Optimize your Laravel application today, and provide your users with a faster and more enjoyable web experience!</p>
	</div>
</div>




		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/laravel-performance-optimization-tips-and-techniques/">Laravel Performance Optimization: Tips and Techniques</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/laravel-performance-optimization-tips-and-techniques/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Monolithic vs Microservice Architecture: Understanding the Differences</title>
		<link>https://nikhilpatel.in/monolithic-vs-microservice-architecture-understanding-the-differences/</link>
					<comments>https://nikhilpatel.in/monolithic-vs-microservice-architecture-understanding-the-differences/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sun, 09 Apr 2023 10:39:39 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=483</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/monolithic-vs-microservice-architecture-understanding-the-differences/">Monolithic vs Microservice Architecture: Understanding the Differences</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e161c6"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e1673a" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><span style="font-weight: 400;">Hello Folks, Are you ready to take your app development to the next level? The choice between monolithic and microservice architecture could make all the difference.</span></p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Monolithic Architecture</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>In a monolithic architecture, the entire application is built as a single unit. All components of the application are tightly coupled and run on a single server or set of servers. In a monolithic architecture, developers build the entire application as a single executable file that is deployed to a single server. Any changes to the application require rebuilding and redeploying the entire application.</p>
<p>Monolithic architectures are often easier to develop and deploy as they have a single codebase, and there is no need to manage different codebases for different components. However, as the application grows, it can become increasingly difficult to maintain, test, and scale. Adding new features can require significant effort, and any changes to one component can impact other components.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Microservice Architecture</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>In a microservice architecture, the application is broken down into smaller, independent services. Each service performs a specific function and communicates with other services through a well-defined interface. Each service is developed and deployed independently, and can be written in different programming languages and deployed on different servers.</p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Microservice architectures allow for greater flexibility and scalability, as each service can be scaled independently. Adding new features can be done more quickly and easily, and changes to one service do not affect the functionality of other services. However, managing and testing multiple services can be more complex, and there is a greater need for communication and coordination between different teams.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Choosing the Right Architecture</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>When choosing between monolithic and microservice architectures, developers should consider the size and complexity of the application, the development and deployment process, and the need for scalability and flexibility. Monolithic architectures are well-suited for smaller applications with simple functionality, while microservice architectures are better suited for larger applications with more complex functionality.</p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>In conclusion, monolithic and microservice architectures are two different approaches to software development, each with its own strengths and weaknesses. Developers should carefully consider the needs of their application before choosing the architecture that is right for them.</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="1080" width="1080" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1.png" alt="Monolithic vs Microservice Architecture: Understanding the Differences" srcset="https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1.png 1080w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-300x300.png 300w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-1024x1024.png 1024w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-150x150.png 150w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-768x768.png 768w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-100x100.png 100w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-140x140.png 140w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-500x500.png 500w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-350x350.png 350w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-1000x1000.png 1000w, https://nikhilpatel.in/wp-content/uploads/2023/04/certificate-of-1-800x800.png 800w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/monolithic-vs-microservice-architecture-understanding-the-differences/">Monolithic vs Microservice Architecture: Understanding the Differences</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/monolithic-vs-microservice-architecture-understanding-the-differences/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Exploring the Power of OpenAI: Building a Chatbot with Laravel</title>
		<link>https://nikhilpatel.in/exploring-the-power-of-openai-building-a-chatbot-with-laravel/</link>
					<comments>https://nikhilpatel.in/exploring-the-power-of-openai-building-a-chatbot-with-laravel/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sun, 26 Feb 2023 10:31:14 +0000</pubDate>
				<category><![CDATA[ChatGPT]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[OpenAI]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Php]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=471</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/exploring-the-power-of-openai-building-a-chatbot-with-laravel/">Exploring the Power of OpenAI: Building a Chatbot with Laravel</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e1d11f"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e1d565" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><span style="font-weight: 400;">Hello Folks, </span><span style="font-weight: 400;">As AI technology advances, OpenAI continues to be at the forefront of innovation. OpenAI is a research organization that develops cutting-edge AI models for natural language processing, image recognition, and more. One of their most popular language models is the Generative Pre-trained Transformer 3 (GPT-3), which can generate human-like text in response to a given prompt.</span></p>
<p><span style="font-weight: 400;">In this blog post, we will explore the power of OpenAI&#8217;s GPT-3 model and learn how to integrate it into a Laravel application to create a chatbot. Laravel is a powerful PHP web framework that is both efficient and easy to learn. By combining the two, we can create an AI-powered chatbot that can assist users with various tasks.</span></p>
<p><span style="font-weight: 400;">We will start by discussing the basics of GPT-3 and its capabilities, as well as the benefits of using Laravel as a web framework. Next, we will dive into the implementation details of integrating GPT-3 into a Laravel application, including setting up the necessary API keys, installing the required dependencies, and creating the chatbot&#8217;s front-end interface.</span></p>
<p><span style="font-weight: 400;">Finally, we will walk through an example use case of our chatbot, demonstrating how it can be used to help users complete a simple task. Along the way, we&#8217;ll discuss best practices for training the model, handling user inputs, and providing relevant responses.</span></p>
<p><span style="font-weight: 400;">By the end of this tutorial, you will have a solid understanding of how to integrate OpenAI&#8217;s GPT-3 model with Laravel, and how to create a powerful chatbot that can enhance your application&#8217;s functionality.</span></p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">GPT-3 Capabilities</h6></div>
		</div>
	</div>
</div><div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Text generation: GPT-3 is capable of generating coherent and contextually relevant text, including essays, articles, stories, and even poetry.</li>
<li>Translation: GPT-3 can translate text between different languages, including rare and obscure ones.</li>
<li>Question answering: GPT-3 can provide answers to questions based on the context and knowledge it has acquired.</li>
<li>Text summarization: GPT-3 can summarize long passages of text into shorter, more concise summaries.</li>
<li>Sentiment analysis: GPT-3 can analyze text to determine the sentiment or emotion behind it.</li>
<li>Text completion: GPT-3 can suggest and complete sentences or paragraphs based on the input it receives.</li>
<li>Chatbot capabilities: GPT-3 can engage in conversations with users and respond appropriately based on the context of the conversation.</li>
<li>Image captioning: GPT-3 can provide captions for images and describe the contents of the image.</li>
<li>Text classification: GPT-3 can categorize text into different categories based on its content.</li>
<li>Language modeling: GPT-3 is trained on a massive dataset of human language, allowing it to understand the nuances and complexities of language and generate text that is contextually appropriate and coherent.</li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">How to sign up ?</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><span style="font-weight: 400;">To get started with OpenAI&#8217;s API, you will need to create an account on the OpenAI website. Here are the steps to sign up:</span></p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="icon-salient-thin-line" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li><span style="font-weight: 400;">Go to the OpenAI website at</span><a href="https://openai.com/"> <span style="font-weight: 400;">https://openai.com/</span></a><span style="font-weight: 400;"> and click on the &#8220;Sign up&#8221; button in the top right corner of the page.</span></li>
<li><span style="font-weight: 400;">Enter your email address and a strong password, then click &#8220;Sign up&#8221;.</span></li>
<li><span style="font-weight: 400;">You will receive an email to verify your account. Click on the link in the email to verify your account.</span></li>
<li><span style="font-weight: 400;">Once your account is verified, log in to the OpenAI website using your email address and password.</span></li>
<li><span style="font-weight: 400;">After logging in, navigate to the &#8220;API&#8221; section of the website.</span></li>
<li><span style="font-weight: 400;">Click on the &#8220;Get API Key&#8221; button to generate an API key.</span></li>
<li><span style="font-weight: 400;">Follow the instructions to create a new API key, then copy the key to your clipboard.</span></li>
</ul>
 </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Get Started with Laravel</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><span style="font-weight: 400;">Here we will use </span><a href="https://github.com/openai-php"><span style="font-weight: 400;">openai-php</span></a><span style="font-weight: 400;"> package by </span><span style="font-weight: 400;">Nuno Maduro.</span><span style="font-weight: 400;"><br />
</span><br />
<em>Note: If you are new about laravel so you can check out our post <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/" target="_blank" rel="noopener">Laravel Setup &amp; Simple CRUD App</a></em></p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p><code>composer require openai-php/client</code></p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now we will create a controller file to handle user requests and responses and Open-AI Services. So we will define a route and setup form in a view file.</p>
<p><code>php artisan make:controller OpenAIController</code></p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="1300" width="1852" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068.png" alt="Exploring the Power of OpenAI: Building a Chatbot with Laravel | nikhilpatel.in" srcset="https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068.png 1852w, https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068-300x211.png 300w, https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068-1024x719.png 1024w, https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068-768x539.png 768w, https://nikhilpatel.in/wp-content/uploads/2023/02/38665776-8ad6-4dc9-b7f0-0f1b11398068-1536x1078.png 1536w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Here we will create a basic form that handles the post method having a simple text area and a submit button.</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="1300" width="2332" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6.png" alt="Exploring the Power of OpenAI: Building a Chatbot with Laravel | nikhilpatel.in" srcset="https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6.png 2332w, https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6-300x167.png 300w, https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6-1024x571.png 1024w, https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6-768x428.png 768w, https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6-1536x856.png 1536w, https://nikhilpatel.in/wp-content/uploads/2023/02/9df58b7a-5bc0-498f-aca2-df938844fbb6-2048x1142.png 2048w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div><div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="1972" width="2830" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef.png" alt="Exploring the Power of OpenAI: Building a Chatbot with Laravel | nikhilpatel.in" srcset="https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef.png 2830w, https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef-300x209.png 300w, https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef-1024x714.png 1024w, https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef-768x535.png 768w, https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef-1536x1070.png 1536w, https://nikhilpatel.in/wp-content/uploads/2023/02/c7246ab3-6b7d-48a4-9420-288e17b56eef-2048x1427.png 2048w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>In conclusion, integrating OpenAI with a Laravel application can provide a powerful tool for generating content and enhancing the overall user experience. We can use this functionality in our Laravel application in various ways, such as generating automated responses to user comments, generating suggested blog post titles, or even automatically generating content for blog posts based on a given topic.</p>
<p>It&#8217;s important to keep in mind that OpenAI is a powerful tool, and it&#8217;s crucial to use it ethically and responsibly. We should be mindful of the potential biases that can be introduced into the generated text, and carefully evaluate the output to ensure that it meets our ethical and quality standards.</p>
<p>Overall, integrating OpenAI with Laravel can open up new possibilities for enhancing the user experience and improving the efficiency of content creation. With proper care and attention, we can harness the power of AI to create compelling and engaging content that resonates with our audience.</p>
	</div>
</div>




		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/exploring-the-power-of-openai-building-a-chatbot-with-laravel/">Exploring the Power of OpenAI: Building a Chatbot with Laravel</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/exploring-the-power-of-openai-building-a-chatbot-with-laravel/feed/</wfw:commentRss>
			<slash:comments>1</slash:comments>
		
		
			</item>
		<item>
		<title>Record &#038; upload video from browser using JS &#038; Laravel-8</title>
		<link>https://nikhilpatel.in/record-upload-video-from-browser-using-js-laravel-8/</link>
					<comments>https://nikhilpatel.in/record-upload-video-from-browser-using-js-laravel-8/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sat, 25 Sep 2021 10:25:00 +0000</pubDate>
				<category><![CDATA[Js]]></category>
		<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[VideoJs]]></category>
		<category><![CDATA[blade]]></category>
		<category><![CDATA[boostrap]]></category>
		<category><![CDATA[JS]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[videojs]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=394</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/record-upload-video-from-browser-using-js-laravel-8/">Record &#038; upload video from browser using JS &#038; Laravel-8</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e2e08d"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e2e381" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Hello Folks, we are back with something very interesting topic. Today we are going to learn how we can record and upload the video to the server from the browser using Js &amp; Laravel-8. So lest’s start.</p>
<p>If you are new and don’t know how to setup laravel then don’t worry you can start from scratch by clicking this link <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/" target="_blank" rel="noopener">Laravel Setup &amp; Simple CRUD App.</a></p>
<p>In this demo, we are going to use JS and Laravel-8 and also we will user Ajax to upload a recorded video. Let’s get started step by step.<br />
<em>Note: we are not going to show how to set up laravel here so you can check out our  post <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/" target="_blank" rel="noopener">Laravel Setup &amp; Simple CRUD App</a></em></p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>After installing laravel just follow these steps.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 1: Migration &amp; Routing</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>We will create Model, Controller in a single command</p>
<pre><code class="language-nginx"> artisan make:model Media -mcr </code></pre>
<p>A migration file will be created in the database/migrations directory, and we need to create our schema. I added file_name (text) column. I used $table-&gt;timestamps(); it will set created_at and updated_at automatically.<br />
Then run the migration command. And also don’t forget to add <strong>file_name </strong> in <strong>App\Models\Media.php</strong> fillable.</p>
<pre><code class="language-nginx">php artisan migrate</code></pre>
<p>So we have to set a resource route in <strong> routes/web.php </strong></p>
<pre><code class="language-php-extras">use App\Http\Controllers\MediaController;</code></pre>
<p>At top of <strong>routes/web.php</strong> and add following line after that.</p>
<pre><code class="language-php-extras">Route::resource('videos', MediaController::class); </code></pre>
<p>We already learned how to set views and layout in the previous post if you haven’t then just check checkout by clicking this link <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/" target="_blank" rel="noopener">Laravel Setup &amp; Simple CRUD App.</a></p>
<p>Now move to the listing page <strong>index.blade.php</strong> in this you can see a listing of all videos and also have a delete option.</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="657" width="1347" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/App-Name-Video-Record-save-to-db.jpg" alt="Record &amp; upload video from browser using JS &amp; Laravel-8" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/App-Name-Video-Record-save-to-db.jpg 1347w, https://nikhilpatel.in/wp-content/uploads/2021/09/App-Name-Video-Record-save-to-db-300x146.jpg 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/App-Name-Video-Record-save-to-db-1024x499.jpg 1024w, https://nikhilpatel.in/wp-content/uploads/2021/09/App-Name-Video-Record-save-to-db-768x375.jpg 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 2: The HTML</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now we had added 2 video tags one for show recording and another one will show your recorded clip preview.</p>
<p>There is a start button from where you can start recording. Stop button to stop recording, Save button to save the video to the table, and upload the video file to the server.Download the button for recorded video download.</p>
<p>Ideally, these elements aren&#8217;t created until it&#8217;s confirmed that The client supports video/camera, but for the sake of illustrating the elements involved, they are created with markup (not JavaScript).</p>
<p>Here the preview will be hidden until video recording stoped.<br />
<script src="https://gist.github.com/nikhilpatel8000/3b064de6393701e161e9c2f9c0b656bb.js"></script></p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 3: The JavaScript &amp; Access the camera interactively</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Modern browsers can have a direct line to the camera allowing us to build experiences that are fully integrated with the web page and the user will never leave the browser.</p>
<p><strong>Acquire access to the camera :</strong> <strong>navigator.mediaDevices.getUserMedia</strong>, a simple method sets the<strong>video </strong> element&#8217;s <strong>src</strong> to the user&#8217;s live camera/webcam. Calling the <strong>start</strong> method of the video then starts the element&#8217;s live streaming video connection. That&#8217;s all that&#8217;s required to connect your camera to the browser! Here we are going to record the only video so the audio parameter will be false.</p>
<pre><code>navigator.mediaDevices.getUserMedia({
	video: true,
	audio: false
})</code></pre>
<p>Here we had set a time limit for 5 seconds so video recording automatically will be stopped after 5 seconds. You can change as per your requirement, you have to do is just pass duration in milliseconds like 5000 for 5 seconds.</p>
<p>So we have set <strong>console.log</strong> to track all the activity of the recording task.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 4: Show the streaming blob</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>A blob is a data type that can store binary data. This is different than most other data types used in databases, such as integers, floating-point numbers, characters, and strings, which store letters and numbers.</p>
<p>Since blobs can store binary data, they can be used to store images or other multimedia files. For example, a photo album could be stored in a database using a blob data type for the images, and a string data type for the captions. Because blobs are used to store objects such as images, audio files, and video clips, they often require significantly more space than other data types.</p>
<p>after the recording stopped we need to set a preview so the user can watch the recorded video he can download or upload to the server.</p>
<p>finally how our recording script looks like.</p>
<p><script src="https://gist.github.com/nikhilpatel8000/e205c612a0d11db3d71a098aacefaf46.js"></script></p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 5: To upload the blob(video) to the server(Laravel-8)</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>As shown above we had set <strong>form object</strong> to append all the data and then we passed data to the controller. Note that since we passing media objects we need to use the POST method so it&#8217;s required CSRF TOKEN for submit data. So we can set CSRF TOKEN to the meta tag so we can use it anywhere on laravel website.</p>
<pre><code>&lt;meta name="csrf-token" content="{{csrf_token()}}"&gt;</code></pre>
<pre><code>document.querySelector('meta[name="csrf-token"]').getAttribute('content')</code></pre>
<p>Now we have to upload the video file to the server. So we need a directory where all the uploaded videos will be moved. We are using storage to move the file so we need to link storage.<br />
Run the following command to link storage</p>
<pre><code>php artisan storage:link</code></pre>
<p>You will see the <strong>storage</strong> directory like a shortcut icon in your public folder. Now just need to add the directory name and, it will create if that directory not exists and move the uploaded file to the server.</p>
<p>So finally how our App\Http\Controllers\MediaController.php looks like:</p>
<p><script src="https://gist.github.com/nikhilpatel8000/6db17184a181cbee06799538d777c57a.js"></script></p>
<p>Of course, you could add some Audio, Image, and GIF from Browser but I&#8217;ll save that for another post. For now, however, simply accessing the camera in our browser moves us miles ahead. Have fun recording videos within your browser!</p>
	</div>
</div>




		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/record-upload-video-from-browser-using-js-laravel-8/">Record &#038; upload video from browser using JS &#038; Laravel-8</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/record-upload-video-from-browser-using-js-laravel-8/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Laravel-8 Simple CRUD App</title>
		<link>https://nikhilpatel.in/laravel-8-simple-crud-app/</link>
					<comments>https://nikhilpatel.in/laravel-8-simple-crud-app/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sat, 18 Sep 2021 11:44:00 +0000</pubDate>
				<category><![CDATA[Laravel]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[blade]]></category>
		<category><![CDATA[boostrap]]></category>
		<category><![CDATA[composer]]></category>
		<category><![CDATA[laravel]]></category>
		<category><![CDATA[Php]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=409</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/">Laravel-8 Simple CRUD App</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e35e98"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e3641c" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Hello Folks, we are here with something very interesting topic for php fans. Today we will see a simple CRUD in laravel.</p>
<p>Laravel is a web application framework with an expressive, elegant syntax. Laravel Is MVC(Model View Controller) architecture.</p>
<p>Laravel has a large and growing community which makes it easy for new developers to find solutions and help with challenges. Laravel releases a new version twice in a year, and the latest version which is Laravel 8 was released on the 8th Sept 2020.</p>
<p>This article will help you to create basic CRUD in laravel. Don&#8217;t worry if you are a beginner we will start from scratch. Laravel has many inbuilt functionalities ready to use which makes laravel a magical framework.</p>
	</div>
</div>




<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>A couple of things you need to have in your system before starting.</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Composer</li>
<li>PHP</li>
<li>Server (WAMP, XAMPP)</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Here we are going to use MySQL. So if you have wamp or xampp then you don&#8217;t need to do anything additional.</p>
<p>You must require a composer in your system. Now the question is what is the composer. In short, a Composer is a tool for dependency management in PHP. It allows you to declare the libraries your project depends on and it will manage (install/update) them for you.</p>
<p>We will learn more about the composer in the next post. Now you can install the composer by <a href="https://getcomposer.org/download/" target="_blank" rel="noopener">clicking here</a>.</p>
<p>Moving forward to laravel-8 simple CRUD app we will go step by step so it makes it more easy and understandable.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 1: Install Laravel</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Go to you command prompt and run the following command :</p>
<pre><code class="language-nginx">composer create-project laravel/laravel=8.0 laravel_crud</code></pre>
<p>It will take a few minutes depending on your internet speed. It will download the laravel framework and required dependencies.</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="269" width="1116" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-1.png" alt="Laravel-8 Simple CRUD App" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-1.png 1116w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-1-300x72.png 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-1-1024x247.png 1024w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-1-768x185.png 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Using this command you don&#8217;t need to copy .env.example to .env and also you don&#8217;t need to generate APP_KEY this is a new version of larave</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="325" width="978" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-2.png" alt="" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-2.png 978w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-2-300x100.png 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-2-768x255.png 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>After a successful full install, you will see a message. And Larave APP is ready.</p>
<p>Run command in your terminal</p>
<pre><code class="language-nginx"> php artisan serv</code></pre>
<p>You will see the following message.</p>
<p><code>Starting Laravel development server: http://127.0.0.1:8000</code></p>
<p>Now run 127.0.0.1:8000 in your browser you will see laravel landing page</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="575" width="1238" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-3.png" alt="" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-3.png 1238w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-3-300x139.png 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-3-1024x476.png 1024w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-3-768x357.png 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 2: Database setup</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Open PHPMyAdmin and create a new database. My database name is laravel_crud</p>
<p>Open the .env file on your IDE or text editor</p>
<pre><code class="language-php-extras">DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=laravel_crud
DB_USERNAME=root
DB_PASSWORD=</code></pre>
<p>Change the DB_DATABASE to the name of your database and if you have set a username and password for your PHPMyAdmin, specify it, otherwise, leave the username as root and password blank.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 3: Creating Migration</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Before moving forward you need to know about laravel migrations.</p>
<p>Migrations are like version control for your database, allowing your team to modify and share the application&#8217;s database schema. Migrations are typically paired with Laravel&#8217;s schema builder to build your application&#8217;s database schema.</p>
<p>If you have ever had to tell a teammate to manually add a column to their local database schema, you&#8217;ve faced the problem that database migrations solve.<br />
you can read more about migration by <a href="https://laravel.com/docs/8.x/migrations" target="_blank" rel="noopener">clicking this link</a>.</p>
<p>I will elaborate on it in the next post. Now we will continue to CRUD.</p>
<p>You can see migration files in the following path :</p>
<p><code>\database\migrations</code></p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="367" width="780" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-5.png" alt="" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-5.png 780w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-5-300x141.png 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-5-768x361.png 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Laravel gives default migration for the user, password reset &amp; jobs</p>
<p>You can create different migrations as per your requirement. Now we are creating migration for the product table. So go to the terminal or Command prompt and write the following command. there is a quick twist. To create migration we need to run the following command</p>
<pre><code class="language-powershell">php artisan make:migration create_products_table --create=products</code></pre>
<p>But we have to create Models &amp; controller so we will create migration , model &amp; controller by using one command :</p>
<pre><code class="language-powershell">php artisan make:model Product -mcr</code></pre>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="123" width="697" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-6.png" alt="Laravel-8 Simple CRUD App" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-6.png 697w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-6-300x53.png 300w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>You can see 3 files created in your project.</p>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="632" width="778" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-7.png" alt="Laravel-8 Simple CRUD App" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-7.png 778w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-7-300x244.png 300w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-7-768x624.png 768w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>A migration file will be created in the database/migrations folder, and we need to create our schema. I added name (string), description(text), sku(string), price (float).</p>
<p>I used $table-&gt;timestamps(); it will set created_at and updated_at automatically.</p>
<pre><code class="language-php">use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateProductsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('products', function (Blueprint $table) {
            $table-&gt;bigIncrements('id');
            $table-&gt;string('name')-&gt;nullable();
            $table-&gt;text('description')-&gt;nullable();
            $table-&gt;decimal('product_price', 12, 2)-&gt;default(0);
            $table-&gt;timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('products');
    }
}</code></pre>
<p>Before we run our migration command, we need to set the default string length, else, we are going to run into errors So go to</p>
<p><code>app/Providers/AppServiceProvider.php</code></p>
<pre><code class="language-php">/**
     * Bootstrap any application services.
     *
     * @return void
     */
    public function boot()
    {
        Schema::defaultStringLength(191);
    }</code></pre>
<p>to the boot function, also add At the top</p>
<pre><code class="language-php">namespace App\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\Schema;</code></pre>
<p>Finally, we run our migration command</p>
<pre><code class="language-powershell">php artisan migrate</code></pre>
	</div>
</div>



<div class="img-with-aniamtion-wrap " data-max-width="100%" data-max-width-mobile="default" data-border-radius="none" data-shadow="none" data-animation="fade-in" >
      <div class="inner">
        <div class="hover-wrap" data-hover-animation="none"> 
          <div class="hover-wrap-inner">
            <img loading="lazy" decoding="async" class="img-with-animation skip-lazy " data-delay="0" height="264" width="680" data-animation="fade-in" src="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-10.png" alt="Laravel-8 Simple CRUD App" srcset="https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-10.png 680w, https://nikhilpatel.in/wp-content/uploads/2021/09/larave-crud-10-300x116.png 300w" sizes="auto, (min-width: 1450px) 75vw, (min-width: 1000px) 85vw, 100vw" />
          </div>
        </div>
      </div>
    </div>
<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 4: Add Resource Route</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>We need to add routes for our CRUD operations, Laravel provides a resource route for us that will take care of the CRUD, that is a route to Create, another route to Retrieve, a separate route to Update, and finally a route to Delete.</p>
<p>So head up to <strong>routes\web.php</strong> and add our resource route</p>
<pre><code class="language-php"> Route::resource(‘products’, ProductController::class); </code></pre>
<p><strong>ProductController::class</strong> this was introduced in this version, Laravel 8 does not know where to call the function from<br />
<strong>use App\Http\Controllers\ProductController&#8217;</strong></p>
<pre><code class="language-php-extras">use Illuminate\Support\Facades\Route;
use App\Http\Controllers\ProductController;

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('welcome');
});

Route::resource('products', ProductController::class);</code></pre>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 5: Controller and Model</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>You can find the following methods in the controller folder<br />
<strong>app/Http/Controllers/ProjectController.php<br />
</strong></p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>index()
<ul>
<li>This method is used for display listing or landing view.</li>
</ul>
</li>
<li>create()
<ul>
<li>this methods used for show create form</li>
</ul>
</li>
<li>store(Request, $request)
<ul>
<li>This method used for store data to the table</li>
</ul>
</li>
<li>show(Product, $product)
<ul>
<li>This method use to show records details</li>
</ul>
</li>
<li>edit(Product, $product)
<ul>
<li>This method used to show edit form with filled data to inputs.</li>
</ul>
</li>
<li>update(Request, $request, Product, $product)
<ul>
<li>This method is used to update records.</li>
</ul>
</li>
<li>destroy( Product, $product)
<ul>
<li>This method is used to delete records from the table.</li>
</ul>
</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>I had mentioned the basic use of all resource methods. We will see each method in the future in this post.<br />
Laravel 8 has created a folder called Models, which is not available in the previous version, so our project model is found in the <strong>app/Models/Product.php </strong></p>
<p>You need to add fillable to insert column value in DB. We create a method of the model so we need to specify which column should be created.</p>
<p><strong>app/Models/Product.php</strong></p>
<pre><code class="language-php">namespace App\Models;

use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;

class Product extends Model
{
    use HasFactory;
    public $timestamps = true;

    protected $fillable = [
        'name',
        'description',
        'product_price',
    ];
}</code></pre>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 6: Add your views</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now move to the front end views. Larvel has a blade file structure for frontend. It&#8217;s necessary to follow the directory structure to interact with our app easily. So we will manage by the following structure.</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Layouts
<ul>
<li>app.blade.php</li>
</ul>
</li>
<li>products
<ul>
<li>Index.blade.php</li>
<li>Create.blade.php</li>
<li>Edit.blade.php</li>
<li>show.blade.php</li>
</ul>
</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>If we are creating another module then we can add a new dir and put all the blade files in that folder so it looks clean and easy to manage.</p>
<p>But we will create a <strong>form.blade</strong> file so we no need to manage to create &amp; edit separate files.</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>products
<ul>
<li>Index.blade.php</li>
<li>form.blade.php</li>
<li>show.blade.php</li>
</ul>
</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Here <strong>\resources\views\layout\app.blade.php </strong> looks like this</p>
<pre><code class="language-php">&lt;html&gt;

&lt;head&gt;
    &lt;title&gt;App Name - @yield('title')&lt;/title&gt;

    &lt;!-- Bootstrap --&gt;
    &lt;link href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.0.0-alpha/css/bootstrap.css" rel="stylesheet"&gt;

    &lt;style&gt;
        .pagination{
            display: block;
        }
        .pagination nav{display: block;}
        .pagination nav .rounded-md svg{width: 10px;}
    &lt;/style&gt;

    &lt;!-- Font Awesome JS --&gt;
    &lt;script defer src="https://use.fontawesome.com/releases/v5.0.13/js/solid.js"
        integrity="sha384-tzzSw1/Vo+0N5UhStP3bvwWPq+uvzCMfrN1fEFe+xBmv1C/AtVX5K0uZtmcHitFZ" crossorigin="anonymous"&gt;
    &lt;/script&gt;
    &lt;script defer src="https://use.fontawesome.com/releases/v5.0.13/js/fontawesome.js"integrity="sha384-6OIrr52G08NpOFSZdxxz1xdNSndlD4vdcf/q2myIUVO0VsqaGHJsB0RaBE01VTOY" crossorigin="anonymous"&gt;
    &lt;/script&gt;

&lt;/head&gt;

&lt;body&gt;

    &lt;div class="container"&gt;
        @yield('content')
    &lt;/div&gt;

&lt;/body&gt;

&lt;/html&gt;
</code></pre>
<p>We need to create index.blade.php in the product folder. Need to extend the layout file. We created <strong>\resources\views\layout\app.blade.php </strong> file and it will be the base of all views. Here we can set css and js</p>
<p>You can find we have added some css for pagination. Now move to <strong>resources\views\products\index.blade.php</strong> file you can find there is a table which has a listing of products and also has an action to edit, view, delete.</p>
<p>Move to <strong>app\Http\Controllers\ProductController.php</strong> you can find <strong>index()</strong> for render view and data.</p>
<p><strong>app\Http\Controllers\ProductController.php</strong></p>
<pre><code class="language-php">/**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
         $products = Product::latest()-&gt;paginate(5);

        return view('products.index', compact('products'))
            -&gt;with('i', (request()-&gt;input('page', 1) - 1) * 5);
    }</code></pre>
<p>Here we had added pagination(5). Laravel provides inbuilt pagination features. Just we need to put pagination() and pass the number of rows you want and do nothing. For display pagination, we need to set</p>
<pre><code class="language-php">$products-&gt;links()</code></pre>
<p>It will show all page numbers with next &amp; previous navigation.</p>
<p>Now you can find a button beside the Laravel 8 crud title. From here we can navigate to add product form.</p>
<pre><code class="language-http"> &lt;a class="btn btn-success" href="{{ route('products.create') }}" title="Create a product"&gt; &lt;i class="fas fa-plus-circle"&gt;&lt;/i&gt;
                    &lt;/a&gt;</code></pre>
<p><strong>app\Http\Controllers\ProductController.php<br />
</strong></p>
<pre><code class="language-php">/**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        return view('products.form');
    }
</code></pre>
<p>When we click on the button we redirect to the create form wish is our <strong>resources\views\products\form.blade.php</strong></p>
<pre><code class="language-php">@extends('layouts.app')

@section('content')
    &lt;div class="row"&gt;
        &lt;div class="col-lg-12 margin-tb" style="margin-top:50px;"&gt;
            &lt;div class="pull-left"&gt;
            &lt;h2&gt;{{(isset($product)) ? 'Edit' : 'Add New'}}  Product&lt;/h2&gt;
            &lt;/div&gt;
            &lt;div class="pull-right"&gt;
                &lt;a class="btn btn-primary" href="{{ route('products.index') }}" title="Go back"&gt; &lt;i class="fas fa-backward "&gt;&lt;/i&gt; &lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    @if ($errors-&gt;any())
        &lt;div class="alert alert-danger"&gt;
            &lt;strong&gt;Whoops!&lt;/strong&gt; There were some problems with your input.&lt;br&gt;&lt;br&gt;
            &lt;ul&gt;
                @foreach ($errors-&gt;all() as $error)
                    &lt;li&gt;{{ $error }}&lt;/li&gt;
                @endforeach
            &lt;/ul&gt;
        &lt;/div&gt;
    @endif
    &lt;form action="{{ (isset($product)) ? route('products.update', $product-&gt;id) : route('products.store') }}" method="POST" &gt;
        @csrf
        @if(isset($product))
            @method('PUT')
        @endif

        &lt;div class="row"&gt;
            &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
                &lt;div class="form-group"&gt;
                    &lt;strong&gt;Name:&lt;/strong&gt;
                    @php
                        $name = (old('name')) ? old('name') : ((isset($product-&gt;name)) ? $product-&gt;name : '');
                    @endphp
                    &lt;input type="text" name="name" class="form-control" placeholder="Name" value="{{$name}}"&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
                &lt;div class="form-group"&gt;
                    &lt;strong&gt;Description:&lt;/strong&gt;
                    @php
                        $description = (old('description')) ? old('description') : ((isset($product-&gt;description)) ? $product-&gt;description : '');
                    @endphp
                    &lt;textarea class="form-control" style="height:50px" name="description" placeholder="description"&gt;{{$description}}&lt;/textarea&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
                &lt;div class="form-group"&gt;
                    &lt;strong&gt;Price:&lt;/strong&gt;
                    @php
                        $price = (old('product_price')) ? old('product_price') : ((isset($product-&gt;product_price)) ? $product-&gt;product_price : '');
                    @endphp
                    &lt;input type="number" name="product_price" class="form-control" placeholder="price" value="{{$price}}"&gt;
                &lt;/div&gt;
            &lt;/div&gt;
            &lt;div class="col-xs-12 col-sm-12 col-md-12 text-center"&gt;
                &lt;button type="submit" class="btn btn-primary"&gt;Submit&lt;/button&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/form&gt;
@endsection
</code></pre>
<p>This form used for add and edit as well. So we have passed the <strong>$product</strong> from the controller. You will find an edit function of the controller.</p>
<p><strong>app\Http\Controllers\ProductController.php</strong></p>
<pre><code class="language-php">/**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function edit(Product $product)
    {
        return view('products.form', compact('product'));
    }</code></pre>
<p>It&#8217;s for code reusability. If there is a large number of fields and complex forms then we can use a separate view for the edit to avoid complexity.</p>
<p>Now move to the <strong>resources\views\products\show.blade.php </strong> Here we had shown details of the product is quite simple and easy. We have passed the project object from the controller.</p>
<p><strong>app\Http\Controllers\ProductController.php</strong></p>
<pre><code class="language-php">/**
     * Display the specified resource.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function show(Product $product)
    {
        return view('products.show', compact('product'));
    }</code></pre>
<p><strong>resources\views\products\show.blade.php</strong></p>
<pre><code class="language-php">@extends('layouts.app')


@section('content')
    &lt;div class="row"&gt;
        &lt;div class="col-lg-12 margin-tb" style="margin-top:50px;"&gt;
            &lt;div class="pull-left"&gt;
                &lt;h2&gt;  {{ $product-&gt;name }}&lt;/h2&gt;
            &lt;/div&gt;
            &lt;div class="pull-right"&gt;
                &lt;a class="btn btn-primary" href="{{ route('products.index') }}" title="Go back"&gt; &lt;i class="fas fa-backward "&gt;&lt;/i&gt; &lt;/a&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;

    &lt;div class="row"&gt;
        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
            &lt;div class="form-group"&gt;
                &lt;strong&gt;Name:&lt;/strong&gt;
                {{ $product-&gt;name }}
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
            &lt;div class="form-group"&gt;
                &lt;strong&gt;Description:&lt;/strong&gt;
                {{ $product-&gt;description }}
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
            &lt;div class="form-group"&gt;
                &lt;strong&gt;Price:&lt;/strong&gt;
                {{ $product-&gt;price }}
            &lt;/div&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-12 col-sm-12 col-md-12"&gt;
            &lt;div class="form-group"&gt;
                &lt;strong&gt;Date Created:&lt;/strong&gt;
                {{ date_format($product-&gt;created_at, 'jS M Y') }}
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
@endsection
</code></pre>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step 6: Add your views</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>So basically we need to pass data to the controller Store method.</p>
<p>In this method we have to do backend validation. Click here to know more about laravel validation <a href="https://laravel.com/docs/8.x/validation" target="_blank" rel="noopener">by clicking this link</a></p>
<p>When we submit the form data will be passed to the store method of ProductController. Here the first request will be validated, if data passes the validation then it will store it to the table.</p>
<pre><code class="language-php">/**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        $request-&gt;validate([
            'name' =&gt; 'required',
            'description' =&gt; 'required',
            'product_price' =&gt; 'required'
        ]);

        Product::create($request-&gt;all());

        return redirect()-&gt;route('products.index')
            -&gt;with('success', 'Product created successfully.');
    }</code></pre>
<p>Same for the update function but we have to pass the object of the product model and it will update that row.</p>
<pre><code class="language-php">/**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function destroy(Product $product)
    {
        $product-&gt;delete();

        return redirect()-&gt;route('products.index')
            -&gt;with('success', 'Product deleted successfully');
    }</code></pre>
<p>We need to pass the object of the Product modal and it will delete that record that’s it.</p>
<p>So now ProductController looks like this.</p>
<pre><code class="language-php">&lt;?php

namespace App\Http\Controllers;

use App\Models\Product;
use Illuminate\Http\Request;

class ProductController extends Controller
{
    /**
     * Display a listing of the resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function index()
    {
         $products = Product::latest()-&gt;paginate(5);

        return view('products.index', compact('products'))
            -&gt;with('i', (request()-&gt;input('page', 1) - 1) * 5);
    }

    /**
     * Show the form for creating a new resource.
     *
     * @return \Illuminate\Http\Response
     */
    public function create()
    {
        return view('products.form');
    }

    /**
     * Store a newly created resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @return \Illuminate\Http\Response
     */
    public function store(Request $request)
    {
        $request-&gt;validate([
            'name' =&gt; 'required',
            'description' =&gt; 'required',
            'product_price' =&gt; 'required'
        ]);

        Product::create($request-&gt;all());

        return redirect()-&gt;route('products.index')
            -&gt;with('success', 'Product created successfully.');
    }

    /**
     * Display the specified resource.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function show(Product $product)
    {
        return view('products.show', compact('product'));
    }

    /**
     * Show the form for editing the specified resource.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function edit(Product $product)
    {
        return view('products.form', compact('product'));
    }

    /**
     * Update the specified resource in storage.
     *
     * @param  \Illuminate\Http\Request  $request
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function update(Request $request, Product $product)
    {
       $request-&gt;validate([
            'name' =&gt; 'required',
            'description' =&gt; 'required',
            'product_price' =&gt; 'required'
        ]);

        $product-&gt;update($request-&gt;all());

        return redirect()-&gt;route('products.index')
            -&gt;with('success', 'Product updated successfully');
    }

    /**
     * Remove the specified resource from storage.
     *
     * @param  \App\Models\Product  $product
     * @return \Illuminate\Http\Response
     */
    public function destroy(Product $product)
    {
        $product-&gt;delete();

        return redirect()-&gt;route('products.index')
            -&gt;with('success', 'Product deleted successfully');
    }
}
</code></pre>
<p>The whole demo project is available on <a href="http://GitHub" target="_blank" rel="noopener">GitHub</a> so that you can see the code in context.</p>
	</div>
</div>




		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/laravel-8-simple-crud-app/">Laravel-8 Simple CRUD App</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/laravel-8-simple-crud-app/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>How to configure PHP 8 in WAMP Server for windows</title>
		<link>https://nikhilpatel.in/how-to-configure-php-8-in-wamp-server-for-windows/</link>
					<comments>https://nikhilpatel.in/how-to-configure-php-8-in-wamp-server-for-windows/#comments</comments>
		
		<dc:creator><![CDATA[Nikhil Patel]]></dc:creator>
		<pubDate>Sun, 06 Jun 2021 05:05:34 +0000</pubDate>
				<category><![CDATA[PHP]]></category>
		<category><![CDATA[Php]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[wamp server]]></category>
		<guid isPermaLink="false">https://nikhilpatel.in/?p=329</guid>

					<description><![CDATA[<p>The post <a href="https://nikhilpatel.in/how-to-configure-php-8-in-wamp-server-for-windows/">How to configure PHP 8 in WAMP Server for windows</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></description>
										<content:encoded><![CDATA[
		<div id="fws_6a56734e51ad4"  data-column-margin="default" data-midnight="dark"  class="wpb_row vc_row-fluid vc_row standard_section "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap" data-bg-animation="none" data-bg-overlay="false"><div class="inner-wrap"><div class="row-bg"  style=""></div></div><div class="row-bg-overlay" ></div></div><div class="row_col_wrap_12 col span_12 dark left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col no-extra-padding inherit_tablet inherit_phone "  data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0" >
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
			<div class="wpb_wrapper">
				<div id="fws_6a56734e51d05" data-midnight="" data-column-margin="default" class="wpb_row vc_row-fluid vc_row inner_row standard_section   "  style="padding-top: 0px; padding-bottom: 0px; "><div class="row-bg-wrap"> <div class="row-bg" ></div> </div><div class="row_col_wrap_12_inner col span_12  left">
	<div  class="vc_col-sm-12 wpb_column column_container vc_column_container col child_column no-extra-padding inherit_tablet inherit_phone "   data-t-w-inherits="default" data-bg-cover="" data-padding-pos="all" data-has-bg-color="false" data-bg-color="" data-bg-opacity="1" data-hover-bg="" data-hover-bg-opacity="1" data-animation="" data-delay="0">
		<div class="vc_column-inner" ><div class="column-bg-overlay-wrap" data-bg-animation="none"><div class="column-bg-overlay"></div></div>
		<div class="wpb_wrapper">
			
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Hello folks, I know it’s a bit late but I realize that this should be helpful for someone. So today we are going to learn how to configure PHP 8 in the windows wamp server.<br />
PHP 8 version is already been launched and you as a tech artisan want to put your hands on a new journey of the version. You may be thinking about how to configure it in my wamp server.</p>
<p>As I personally know that if you are using windows wamp then you can easily switch PHP versions so it very uses full for a run some older projects which were using an older version of PHP.</p>
<p>So before we start configuration we must know the basic requirement of php8.</p>
	</div>
</div>



<div class="nectar-fancy-ul" data-list-icon="steadysets-icon-arrow-right" data-animation="false" data-animation-delay="0" data-color="accent-color" data-spacing="default" data-alignment="left"> 
<ul>
<li>Apache 2.4.x, I already have apache 2.4.46 installed in my wamp</li>
<li>first you need to install Microsoft Visual C++ Redistributable for Visual Studio 2015, 2017, and 2019. Download and install both the<a href="https://aka.ms/vs/16/release/vc_redist.x86.exe" target="_blank" rel="noopener"> x86</a> and <a href="https://aka.ms/vs/16/release/vc_redist.x64.exe" target="_blank" rel="noopener">x64</a> versions by <a href="https://support.microsoft.com/en-us/topic/the-latest-supported-visual-c-downloads-2647da03-1eea-4433-9aff-95f26a218cc0" target="_blank" rel="noopener">clicking this link</a>. If you have 32 bit OS, then i recommend downloading the 32-bit package only. If you have 64-bit os then i recommend installing both.</li>
</ul>
 </div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Once you are ready with installation then we are ready to configure PHP8.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step: 1</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Download the PHP8 version by <a href="https://windows.php.net/download/" target="_blank" rel="noopener">clicking this link for windows</a>. Select the x64 Thread Safe version if you have 64bit Windows. Right now PHP 8.0.6 is available so I downloaded that one.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step: 2</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Goto your WAMP directory, (generally C:/wamp) but I had installed it in D:/ drive so my path is D:/wamp. Now go to D:/wamp/bin/php and create a new folder named “php8.0.6″ and extract here the downloaded PHP .zip file.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step: 3</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now, go to the old PHP folder ( D:/wamp/bin/php/php7.2.33). (mine is php7.2.33), and copy wampserver.conf from old and paste it to your “php8.0.6″ D:/wamp/bin/php/php8.0.6) directory.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step:4</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now, go to D:/wamp/bin/php/php8.0.6 directory and find file php.ini-development. Copy it and rename it to php.ini in the same directory. Make sure you set the current path in extension_dir<br />
next, open that php.ini file and update the following values:<br />
<code class="language-php-extras"><br />
extension_dir = D:/wamp/bin/php/php8.0.6/ext<br />
upload_tmp_dir = D:/wamp/tmp<br />
error_log = D:/wamp64/logs/php_error.log<br />
</code><br />
Now, scroll down to extension list and choose the extensions which will nessesory and usefull for your projetcs. mostly are there but you only have to uncomment. i needed following :<br />
<code class="language-php-extras"><br />
extension=bz2<br />
extension=curl<br />
extension=fileinfo<br />
extension=gd<br />
extension=gettext<br />
extension=gmp<br />
extension=intl<br />
extension=imap<br />
extension=ldap<br />
extension=mbstring<br />
extension=exif      ; Must be after mbstring as it depends on it<br />
extension=mysqli<br />
extension=openssl<br />
extension=pdo_mysql<br />
extension=pdo_sqlite<br />
extension=snmp<br />
extension=soap<br />
extension=sockets<br />
extension=xsl<br />
</code><br />
Save and close the file.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step:5</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Next, create a duplicate of php.ini file and rename it as phpForApache.ini. This file used by the Apache webserver.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step:6</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>Now open wampserver.conf copied in D:/wamp/bin/php/php8.0.6/ directory in <strong>Step 3</strong> above. make the changes in it so that it should look like the following:</p>
<p><script src="https://gist.github.com/nikhilpatel8000/d9f2347a374ef3a2af3ee0e324fc0a2e.js"></script></p>
<p><strong>Note</strong> : Here the LoadModuleName for PHP 8 is php_module and LoadModuleFile for PHP 8 is php8apache2_4.dll</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Step:7</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>now re-start WAMP server and go to PHP &gt; PHP Version and there you will find version 8.0.6 and select it.<br />
<img loading="lazy" decoding="async" class="alignnone size-full wp-image-343" src="https://nikhilpatel.in/wp-content/uploads/2021/06/wanmp.png" alt="" width="624" height="400" srcset="https://nikhilpatel.in/wp-content/uploads/2021/06/wanmp.png 624w, https://nikhilpatel.in/wp-content/uploads/2021/06/wanmp-300x192.png 300w" sizes="auto, (max-width: 624px) 100vw, 624px" /><br />
You can see that the PHP version is now updated to PHP 8 in PHP Info from localhost in any browser.</p>
	</div>
</div>




<div class="nectar-animated-title" data-style="color-strip-reveal" data-color="accent-color">
	<div class="nectar-animated-title-outer">
		<div class="nectar-animated-title-inner">
			<div class="wrap"><h6 style="color: #ffffff;">Notes to keep in mind :</h6></div>
		</div>
	</div>
</div>
<div class="wpb_text_column wpb_content_element " >
	<div class="wpb_wrapper">
		<p>It is recommended to include the new path in your system path directory otherwise you may face some issues with your CURL extension.<br />
navigate to Windows environment variable window and edit system variable &#8220;Path&#8221; to add a new string &#8220;D:\wamp\bin\php\php8.0.6;&#8221;.<br />
This step will resolve the CURL error &#8220;Unable to load dynamic library &#8216;php_curl.dll&#8217; &#8211; The specified module could not be found in Unknown on line 0&#8221;</p>
<p><em>Now Enjoy Codding journey with PHP8. I hope this will help.</em></p>
	</div>
</div>




		</div> 
	</div>
	</div> 
</div></div>
			</div> 
		</div>
	</div> 
</div></div>
<p>The post <a href="https://nikhilpatel.in/how-to-configure-php-8-in-wamp-server-for-windows/">How to configure PHP 8 in WAMP Server for windows</a> appeared first on <a href="https://nikhilpatel.in">Nikhil Patel</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://nikhilpatel.in/how-to-configure-php-8-in-wamp-server-for-windows/feed/</wfw:commentRss>
			<slash:comments>40</slash:comments>
		
		
			</item>
	</channel>
</rss>
