<?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: Laurensius Adi</title>
    <description>The latest articles on DEV Community by Laurensius Adi (@laurensiusadi).</description>
    <link>https://dev.to/laurensiusadi</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%2F107633%2Fd11a2757-ce62-4a85-a6b5-f5599f57fb44.jpeg</url>
      <title>DEV Community: Laurensius Adi</title>
      <link>https://dev.to/laurensiusadi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/laurensiusadi"/>
    <language>en</language>
    <item>
      <title>Laravel 8 with Fortify, Vue 2 and Tailwind CSS</title>
      <dc:creator>Laurensius Adi</dc:creator>
      <pubDate>Mon, 01 Feb 2021 12:39:50 +0000</pubDate>
      <link>https://dev.to/laurensiusadi/laravel-8-with-fortify-vue-2-and-tailwind-css-2235</link>
      <guid>https://dev.to/laurensiusadi/laravel-8-with-fortify-vue-2-and-tailwind-css-2235</guid>
      <description>&lt;p&gt;I want to make a project with the newest Laravel 8 for the public web and having Vue JS SPA for the private web app. I found out it's quite tricky to setup the authentication part since Laravel explicitly instruct you to choose between Breeze and Jetstream starter kits.&lt;/p&gt;

&lt;p&gt;The closest setup they have is Laravel Jetstream with Inertia and Vue JS but it doesn't really suit my needs, and I don't need the extras.&lt;/p&gt;

&lt;p&gt;To keep it slim down and simple, I decided to make my own starter template. Luckily there's some helpful tutorials out there, notably by Laravel Daily / Povilas Korop &lt;a href="https://dev.to/povilaskorop"&gt;https://dev.to/povilaskorop&lt;/a&gt; in his YouTube video:&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/NuGBzmHlINQ"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;In this video he explains everything you need to know about the Laravel situation and the decision choosing Fortify.&lt;/p&gt;

&lt;p&gt;After setting up Fortify, I continue setting up Vue, Vuex and Vue Router with the help from this article &lt;a href="https://medium.com/@martinsOnuoha/set-up-vue-vuex-vue-router-sass-in-laravel-8-590c768e8387"&gt;https://medium.com/@martinsOnuoha/set-up-vue-vuex-vue-router-sass-in-laravel-8-590c768e8387&lt;/a&gt;. Then I did the Tailwind setup with the help from their documentation &lt;a href="https://tailwindcss.com/docs/guides/laravel"&gt;https://tailwindcss.com/docs/guides/laravel&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;I spent about 4 hours on this setup. Let me know if anything doesn't run as expected or if you need any help. Hope you find this helpful.&lt;/p&gt;

&lt;p&gt;Here's the final result:&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--i3JOwpme--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev.to/assets/github-logo-ba8488d21cd8ee1fee097b8410db9deaa41d0ca30b004c0c63de0a479114156f.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/laurensiusadi"&gt;
        laurensiusadi
      &lt;/a&gt; / &lt;a href="https://github.com/laurensiusadi/laravel-fortify-vue-tailwind-template"&gt;
        laravel-fortify-vue-tailwind-template
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Basic setup Laravel 8 + Fortify + Tailwind + Vue 2
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;h2&gt;
Laravel Public + Vue Private SPA&lt;/h2&gt;
&lt;p&gt;Basic setup Laravel 8 + Fortify + Tailwind + Vue 2&lt;/p&gt;
&lt;p&gt;The idea is to have basic public facing website handled by Laravel, so it's going to be quick and doesn't need to setup server rendering for Vue.&lt;/p&gt;
&lt;h2&gt;
Features&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;All essentials auth pages included&lt;/li&gt;
&lt;li&gt;Email confirmation sequence&lt;/li&gt;
&lt;li&gt;Private web app SPA Vue JS&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
Notes&lt;/h3&gt;
&lt;p&gt;Private route URL is &lt;code&gt;/app&lt;/code&gt;, defined in:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;app\Providers\RouteServiceProvider.php&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;resources\js\router.js&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;routes\web.php&lt;/code&gt;&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
How To Run Project&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;Copy &lt;code&gt;env.example&lt;/code&gt; and rename to &lt;code&gt;.env&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Fill in database and email&lt;/li&gt;
&lt;li&gt;Install all dependencies &lt;code&gt;composer install&lt;/code&gt; and &lt;code&gt;npm install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;php artisan migrate&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;php artisan serve&lt;/code&gt; and in another terminal &lt;code&gt;npm run watch&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;
How To Disable Email Confirmation&lt;/h3&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;routes\web.php&lt;/code&gt;: Remove all routes under Email Verification, and remove middleware verified&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;config\fortify.php&lt;/code&gt;: Remove &lt;code&gt;Features::emailVerification()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;app\Models\User.php&lt;/code&gt;: Remove &lt;code&gt;implements MustVerifyEmail&lt;/code&gt;
&lt;/li&gt;
&lt;/ol&gt;
&lt;/div&gt;



&lt;/div&gt;
&lt;br&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/laurensiusadi/laravel-fortify-vue-tailwind-template"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;br&gt;
&lt;/div&gt;
&lt;br&gt;


&lt;p&gt;Note, I haven't make anything on the API side, how the Vue will interact with Laravel API, but you can use &lt;code&gt;window.axios&lt;/code&gt; in the Vue component. &lt;/p&gt;

</description>
      <category>laravel</category>
      <category>fortify</category>
      <category>vue</category>
      <category>tailwindcss</category>
    </item>
  </channel>
</rss>
