<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Arslan Tariq</title>
    <description>The latest articles on DEV Community by Arslan Tariq (@arslandesigner).</description>
    <link>https://dev.to/arslandesigner</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F25103%2F3c95bb73-640f-48b7-98f3-54965af25d00.png</url>
      <title>DEV Community: Arslan Tariq</title>
      <link>https://dev.to/arslandesigner</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/arslandesigner"/>
    <language>en</language>
    <item>
      <title>A Laravel Package to Protect Routes With a PIN Code</title>
      <dc:creator>Arslan Tariq</dc:creator>
      <pubDate>Wed, 08 Mar 2023 20:24:22 +0000</pubDate>
      <link>https://dev.to/arslandesigner/a-laravel-package-to-protect-routes-with-a-pin-code-3b2g</link>
      <guid>https://dev.to/arslandesigner/a-laravel-package-to-protect-routes-with-a-pin-code-3b2g</guid>
      <description>&lt;p&gt;Have you ever needed to protect certain routes or pages of your Laravel app with a secure PIN code? Laravel's Require Pin package can help you with that.&lt;/p&gt;

&lt;p&gt;This package provides a middleware that intercepts the routes or a group of routes requiring a PIN. When a user tries to access a protected route, they will be prompted to enter their PIN code. Once the user enters a valid PIN, they will be redirected and allowed access to the protected route.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Route::get('/see-my-paycheck', MyController::class)
    -&amp;gt;middleware('require.pin');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One of the great features of this package is that it also provides an API route that you can use to validate and manage a user's PIN. This makes it easy to integrate the Require Pin package with other parts of your Laravel app.&lt;/p&gt;

&lt;p&gt;When a user tries to visit &lt;strong&gt;/see-my-paycheck&lt;/strong&gt; in the above example, this package will prompt the user to enter their PIN code before taking them to the page. This package also provides an API route you can use to validate and manage a user's PIN.&lt;/p&gt;

&lt;p&gt;The basic idea of how this package works within your Laravel app is as follows:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Add the require.pin middleware to routes or a group of routes requiring a pin.&lt;/li&gt;
&lt;li&gt;The middleware will intercept those routes.&lt;/li&gt;
&lt;li&gt;The package generates a temporary URL to authenticate with their PIN.&lt;/li&gt;
&lt;li&gt;Once the user enters their valid PIN, it will redirect and allow them access to the PIN-protected route.&lt;/li&gt;
&lt;/ul&gt;

&lt;blockquote&gt;
&lt;p&gt;View the &lt;a href="https://github.com/ikechukwukalu/requirepin"&gt;Source Code&lt;/a&gt; on GitHub&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>laravelvalidation</category>
      <category>pincode</category>
      <category>laravelpackage</category>
      <category>laravel</category>
    </item>
    <item>
      <title>How to Fix the XAMPP Error “MySQL Shutdown Unexpectedly”</title>
      <dc:creator>Arslan Tariq</dc:creator>
      <pubDate>Sat, 04 Jun 2022 10:37:48 +0000</pubDate>
      <link>https://dev.to/arslandesigner/how-to-fix-the-xampp-error-mysql-shutdown-unexpectedly-3h03</link>
      <guid>https://dev.to/arslandesigner/how-to-fix-the-xampp-error-mysql-shutdown-unexpectedly-3h03</guid>
      <description>&lt;p&gt;If you use a local development environment, you may run into problems that are similar to those on a live server. In some cases, your website or web application may be unable to connect with its database because MySQL isn’t running or it shut down unexpectedly.&lt;/p&gt;

&lt;p&gt;Depending on which local environment you use, the process of troubleshooting your MySQL database might vary a bit. With XAMPP, the process is remarkably straightforward since you get access to a control panel instead of having to rely on the command line only.&lt;/p&gt;

&lt;h4&gt;
  
  
  What the XAMPP Error “MySQL Shutdown Unexpectedly” Is
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xmpszHT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxoimyz8bw2iya0i0e9o.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xmpszHT3--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jxoimyz8bw2iya0i0e9o.png" alt="Image description" width="668" height="434"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Note&lt;/strong&gt;&lt;br&gt;
Caution! Don't delete &lt;code&gt;ibdata1&lt;/code&gt; file!&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Rename folder &lt;code&gt;mysql/data&lt;/code&gt; to &lt;code&gt;mysql/data_old&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Make a copy of &lt;code&gt;mysql/backup&lt;/code&gt; folder and name it as &lt;code&gt;mysql/data&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy all your database folders and mysql folder from &lt;code&gt;mysql/data_old&lt;/code&gt; into &lt;code&gt;mysql/data&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Copy &lt;code&gt;mysql/data_old/ibdata1&lt;/code&gt; file into &lt;code&gt;mysql/data&lt;/code&gt; folder&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;strong&gt;Start MySQL from XAMPP Control Panel&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;XAMPP Fixed&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yA2tbew5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby85nr1zrvlv2zzh88w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yA2tbew5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/eby85nr1zrvlv2zzh88w.png" alt="Image description" width="668" height="434"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>xampp</category>
      <category>mysql</category>
      <category>development</category>
      <category>localhost</category>
    </item>
  </channel>
</rss>
