<?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: Yussuf Mussa</title>
    <description>The latest articles on DEV Community by Yussuf Mussa (@yussufmussa).</description>
    <link>https://dev.to/yussufmussa</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%2F553513%2F704d7809-8223-4337-a049-600d778aee08.jpg</url>
      <title>DEV Community: Yussuf Mussa</title>
      <link>https://dev.to/yussufmussa</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/yussufmussa"/>
    <language>en</language>
    <item>
      <title>Add Google reCAPTCHA in Laravel Breeze Registration</title>
      <dc:creator>Yussuf Mussa</dc:creator>
      <pubDate>Tue, 20 Jun 2023 13:21:00 +0000</pubDate>
      <link>https://dev.to/yussufmussa/add-google-recaptcha-in-laravel-breeze-registration-212d</link>
      <guid>https://dev.to/yussufmussa/add-google-recaptcha-in-laravel-breeze-registration-212d</guid>
      <description>&lt;p&gt;In this post, I will guide you step by step on how to add Google reCAPTCHA v2 Checkbox to the Laravel Breeze Registration Form. I will use the NoCaptcha Laravel package. Integrating reCAPTCHA into your application helps prevent automated spam registrations.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;## Step 1: Obtaining reCAPTCHA Keys&lt;/strong&gt;&lt;br&gt;
Go to the Google reCAPTCHA website (&lt;a href="https://www.google.com/recaptcha"&gt;https://www.google.com/recaptcha&lt;/a&gt;) and sign in with your Google account. Click the + sign and fill in the details as follows:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Label:&lt;/strong&gt; use the domain name of your application&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;reCAPTCHA type:&lt;/strong&gt; Select challenge(v2) and tick I’m not a robot checkbox&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Domain:&lt;/strong&gt; in our case add 127.0.0.1 since you are on a local machine but you can change this later to your domain name once on the live server or just add the domain name you will use.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BhZ6IZoX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfcfdmenfou7x4f9e81f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BhZ6IZoX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/tfcfdmenfou7x4f9e81f.png" alt="Image description" width="800" height="527"&gt;&lt;/a&gt;&lt;br&gt;
Click submit to generate your site keys&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pehfSm_y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qhkq81ydrkvqzy9markc.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pehfSm_y--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qhkq81ydrkvqzy9markc.png" alt="Image description" width="800" height="323"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the keys are generated copy them and paste them somewhere else as they will be needed later.&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Step 2: Installing NoCaptcha Laravel Package&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Run this command to install NoCaptcha Package.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer require anhskohbo/no-captcha
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After the package is installed, open your config/app.php file and add the following line to the providers array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Anhskohbo\NoCaptcha\NoCaptchaServiceProvider::class,
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Next, run the following command to publish the package configuration file.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan vendor:publish --provider="Anhskohbo\NoCaptcha\NoCaptchaServiceProvider"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 3: Configuring NoCaptcha Package&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Open the generated &lt;strong&gt;config/nocaptcha.php&lt;/strong&gt; file. In this file, we will need to supply the NOCAPTCHA_SECRET and NOCAPTCHA_SITEKEY on the .env file.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--i5Ekfb8M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebz9dxa09l2gh4n89xtg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i5Ekfb8M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ebz9dxa09l2gh4n89xtg.png" alt="Image description" width="666" height="287"&gt;&lt;/a&gt;&lt;br&gt;
Go to .env file and paste your site keys as shown below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SOT4lu4g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f286cip0l2nogsty7i8l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SOT4lu4g--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/f286cip0l2nogsty7i8l.png" alt="Image description" width="800" height="100"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  &lt;strong&gt;Step 4: Updating Laravel Breeze Registration Views&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Open the &lt;strong&gt;resources/views/auth/register.blade.php&lt;/strong&gt; file. and add the following before the submit button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;!-- google recaptch --&amp;gt;
  &amp;lt;div class="mt-4"&amp;gt;
      {!! NoCaptcha::renderJs() !!}
      {!! NoCaptcha::display() !!}
      @if ($errors-&amp;gt;has('g-recaptcha-response'))
      &amp;lt;x-input-error :messages="$errors-&amp;gt;first('g-recaptcha-response')" /&amp;gt;
      @endif
  &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  &lt;strong&gt;Step 5: Updating Laravel Breeze Registration Controller&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Open the &lt;strong&gt;app/Http/Controllers/Auth/RegisteredUserController.php&lt;/strong&gt; file. and add the following code to the store method to validate the reCAPTCHA response.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$this-&amp;gt;validate($request, [
    // Existing validation rules...
    'g-recaptcha-response' =&amp;gt; 'required|captcha',
],['g-recaptcha-response' =&amp;gt; 'Please Verify you are not a robot']);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;blockquote&gt;
&lt;p&gt;Note: [‘g-recaptcha-response’ =&amp;gt; ‘Please Verify you are not a robot’] used to set a more user friendly message in case of an error.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Start the server and go to &lt;strong&gt;&lt;a href="http://localhost:8000/register"&gt;http://localhost:8000/register&lt;/a&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;You should see the new checkbox of Google Recaptcha&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Adazg6GQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anv0kld69m5clu03ljoo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Adazg6GQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/anv0kld69m5clu03ljoo.png" alt="Image description" width="744" height="627"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Web Hosting Options: Shared vs. VPS vs. Dedicated Servers</title>
      <dc:creator>Yussuf Mussa</dc:creator>
      <pubDate>Fri, 16 Jun 2023 10:21:43 +0000</pubDate>
      <link>https://dev.to/yussufmussa/understanding-web-hosting-options-shared-vs-vps-vs-dedicated-servers-a9m</link>
      <guid>https://dev.to/yussufmussa/understanding-web-hosting-options-shared-vs-vps-vs-dedicated-servers-a9m</guid>
      <description>&lt;p&gt;Choosing the right web hosting solution is a crucial decision for developers and businesses alike. With various options available, such as shared hosting, virtual private servers (VPS), and dedicated servers, it’s essential to understand their differences, advantages, and limitations. In this comprehensive article, we’ll dive into each hosting type, providing technical insights and relevant examples to help you make an informed decision.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. Shared Hosting&lt;/strong&gt;&lt;br&gt;
Shared hosting is an entry-level hosting option where multiple websites share resources on a single server. Let’s explore its key aspects:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Resource Sharing:&lt;/strong&gt; In a shared hosting environment, server resources like CPU, RAM, and disk space are shared among multiple websites. This cost-effective solution is suitable for small-scale websites or those with moderate traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Performance Considerations:&lt;/strong&gt; While shared hosting is budget-friendly, resource sharing can affect performance. If one website experiences a sudden surge in traffic or resource consumption, it may impact the overall server performance, causing slower load times for all shared sites.&lt;/p&gt;

&lt;p&gt;It’s more practical to use shared hosting in a situation where you’re starting a personal blog or a small portfolio website. Shared hosting would be an ideal choice since you won’t have high traffic or resource demands initially.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Virtual Private Servers (VPS)&lt;/strong&gt;&lt;br&gt;
VPS hosting offers a middle ground between shared hosting and dedicated servers. It provides virtualized resources within a shared server environment. Let’s delve into its details:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dedicated Resources:&lt;/strong&gt; With VPS hosting, you have dedicated resources allocated to your virtual server, providing better performance and reliability compared to shared hosting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Scalability:&lt;/strong&gt; VPS allows for easy scalability, enabling you to upgrade your resources as your website grows. You have more control over server settings and can install custom software.&lt;/p&gt;

&lt;p&gt;It’s more practical to use a virtual private server(VPS) in a situation where you’re running an e-commerce platform with moderate traffic and resource requirements. VPS hosting would give you the flexibility and performance you need without the higher costs of a dedicated server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Dedicated Servers&lt;/strong&gt;&lt;br&gt;
Dedicated servers provide exclusive access to an entire physical server, offering maximum control and performance. Let’s explore the advantages and considerations of dedicated hosting:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Complete Control:&lt;/strong&gt; With a dedicated server, you have full root access, allowing you to configure the server according to your specific requirements. This level of control is beneficial for complex applications or websites with high traffic.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Enhanced Performance:&lt;/strong&gt; Since all server resources are dedicated to your website, you can expect exceptional performance, faster load times, and a better overall user experience.&lt;/p&gt;

&lt;p&gt;It’s more practical to use a dedicated server in a situation where you’re running a large-scale enterprise-level application with heavy traffic, complex functionality, and strict security requirements. Dedicated hosting would provide the resources and control necessary to meet your specific needs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Choosing the Right Web Hosting Option&lt;/strong&gt;&lt;br&gt;
The right web hosting option for you will depend on your website’s needs. If you have a small website with low traffic, shared hosting is a good option. If you have a medium-sized website with moderate traffic, VPS hosting is a good option. If you have a large website with high traffic, dedicated hosting is a good option.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tips for Choosing a Web Hosting Provider&lt;/strong&gt;&lt;br&gt;
When choosing a web hosting provider, there are a few things you should keep in mind:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Price:&lt;/strong&gt; Web hosting prices can vary widely. It’s important to find a provider that offers a plan that fits your budget.&lt;br&gt;
&lt;strong&gt;Features:&lt;/strong&gt; Make sure the provider offers the features you need, such as storage space, bandwidth, and email accounts.&lt;br&gt;
&lt;strong&gt;Support:&lt;/strong&gt; Make sure the provider offers good customer support in case you need help with your website.&lt;br&gt;
&lt;strong&gt;P.S:&lt;/strong&gt; The best way to choose the right web hosting option for you is to consider your website’s needs and budget.&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
