<?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: Milan Chheda</title>
    <description>The latest articles on DEV Community by Milan Chheda (@chhedamilan).</description>
    <link>https://dev.to/chhedamilan</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%2F54575%2F630c4aee-d767-4bc8-8847-bc63931591dc.jpeg</url>
      <title>DEV Community: Milan Chheda</title>
      <link>https://dev.to/chhedamilan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chhedamilan"/>
    <language>en</language>
    <item>
      <title>[How-to] Disable Registration in Laravel 5.7</title>
      <dc:creator>Milan Chheda</dc:creator>
      <pubDate>Sun, 11 Nov 2018 06:02:33 +0000</pubDate>
      <link>https://dev.to/chhedamilan/how-to-disable-registration-in-laravel-57-e93</link>
      <guid>https://dev.to/chhedamilan/how-to-disable-registration-in-laravel-57-e93</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--C8PLfo5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://milanchheda.com/uploads/cards/17.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--C8PLfo5L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://milanchheda.com/uploads/cards/17.png" alt="[How-to] Disable Registration in Laravel 5.7"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;In one of my previous &lt;a href="https://dev.to/chhedamilan/how-to-disable-registration-in-laravel-1pk3-temp-slug-8145473"&gt;posts&lt;/a&gt;, I have shown how to disable registration in Laravel.&lt;/p&gt;

&lt;p&gt;In Laravel 5.7, a new way has been introduced to disable registration and that's all thanks to &lt;a href="https://twitter.com/dennis_smink"&gt;Dennis Smink&lt;/a&gt;, for his excellent &lt;a href="https://github.com/laravel/framework/pull/25556"&gt;pull request&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Auth::routes(['register' =&amp;gt; false]);
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;That's the only code you need to add and that would disable the registration in your Laravel application.&lt;/p&gt;

</description>
      <category>laravel</category>
    </item>
    <item>
      <title>Explain Microservices Like I'm Five</title>
      <dc:creator>Milan Chheda</dc:creator>
      <pubDate>Tue, 20 Feb 2018 10:14:18 +0000</pubDate>
      <link>https://dev.to/chhedamilan/explain-microservices-like-im-five--653</link>
      <guid>https://dev.to/chhedamilan/explain-microservices-like-im-five--653</guid>
      <description></description>
      <category>explainlikeimfive</category>
    </item>
    <item>
      <title>What is the architecture stack for dev.to?</title>
      <dc:creator>Milan Chheda</dc:creator>
      <pubDate>Tue, 20 Feb 2018 10:01:46 +0000</pubDate>
      <link>https://dev.to/chhedamilan/what-is-the-architecture-stack-for-devto-2hah</link>
      <guid>https://dev.to/chhedamilan/what-is-the-architecture-stack-for-devto-2hah</guid>
      <description>&lt;p&gt;I would like to know the architecture stack or the tweaks behind making this site so blazingly fast. It just amazes and makes surfing so smooth and fast.&lt;/p&gt;

</description>
      <category>technology</category>
      <category>architecture</category>
      <category>devops</category>
    </item>
    <item>
      <title>[How-to] Configure A New Laravel Project (With Tailwind CSS)</title>
      <dc:creator>Milan Chheda</dc:creator>
      <pubDate>Fri, 09 Feb 2018 08:41:38 +0000</pubDate>
      <link>https://dev.to/chhedamilan/how-to-configure-a-new-laravel-project-with-tailwind-css-l1h</link>
      <guid>https://dev.to/chhedamilan/how-to-configure-a-new-laravel-project-with-tailwind-css-l1h</guid>
      <description>

&lt;p&gt;Recently, I have been working on few laravel projects and every time I configure new project, I end up making a critical error by either missing/forgetting some important steps. No doubt, &lt;a href="https://laravel.com/docs/5.5/installation"&gt;Laravel documentation&lt;/a&gt; is excellent and does a great a job in installing/setting up the laravel, but there still are several things that needs to be configured before we can really start working. So I came up with this checklist that serves as a ready reckoner to setup and configure a new laravel project.&lt;/p&gt;

&lt;p&gt;Create a new laravel project using the &lt;a href="https://laravel.com/docs/5.5/installation#installing-laravel"&gt;laravel installer&lt;/a&gt; by running the below command:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;composer create-project --prefer-dist laravel/laravel &amp;lt;project-name&amp;gt; "5.5.*"
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Create a MySQL database from command line:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;mysql -u&amp;lt;mysql-username&amp;gt; -p create database &amp;lt;project-database-name&amp;gt;;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Out-of-the-box, Laravel provides us with an .env file to configure our project. Let's update that file with the above database credentials.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;DB_DATABASE=&amp;lt;project-database-name&amp;gt;

DB_USERNAME=&amp;lt;mysql-username&amp;gt;

DB_PASSWORD=&amp;lt;mysql-password&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In 99% of my projects, I use out-of-the-box authentication. Make sure, you are in the projects root directory and execute the below command. If you don’t need out-of-the-box authentication, you can feel skip this step.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan make:auth
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Once the above step is performed, you can run the migration and create the authentication tables.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan migrate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install the JS packages by running the below command from the projects root directory&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Install other dependencies that are required before starting the development. In my recent projects, I have been using &lt;a href="https://tailwindcss.com/docs/what-is-tailwind"&gt;Tailwind CSS&lt;/a&gt; and hence would be adding that as an initial dependency.&lt;br&gt;&lt;br&gt;
Install the tailwindcss package:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;npm install tailwindcss --save-dev
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Run below command to generate the config file&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;./node_modules/.bin/tailwind init
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I prefer using sass, so update the app.sass file with below (in same order):&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;@tailwind preflight
@tailwind utilities
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Add below line on top of webpack.mix.js&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let tailwindcss = require('tailwindcss');
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;And lastly, replace the sass() code with below:&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;.sass('resources/assets/sass/app.sass', 'public/css').options({ 
    processCssUrls: false, postCss:[tailwindcss(‘./tailwind.js')], 
});
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Yay! We are ready to start coding. Run the below command from the projects root directory to start the PHP’s built-in server and start development.&lt;/p&gt;



&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;php artisan serve
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;That’s it.&lt;/strong&gt; I hope this checklist helps to configure a new laravel project in minutes, and thereby avoid any obvious mistakes that takes away the productive time from actual development.&lt;/p&gt;

&lt;p&gt;Happy Coding! :)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at&lt;/em&gt; &lt;a href="https://milanchheda.com/how-to-configure-a-new-laravel-project"&gt;&lt;em&gt;milanchheda.com&lt;/em&gt;&lt;/a&gt; &lt;em&gt;on February 9, 2018.&lt;/em&gt;&lt;/p&gt;


</description>
      <category>laravel5</category>
      <category>laravel</category>
      <category>tutorial</category>
      <category>tailwindcss</category>
    </item>
  </channel>
</rss>
