Playing
01. Introduction and demo

Transcript

00:00
okay so in this course we're going to be building out a url shortener but we're going to be doing this with vault and folio now if you've not heard of vault or folio we're going to cover everything that you need to know to get started
00:13
if you have heard of them then this will hopefully give you a few tips just to clean things up and work with it a little bit more efficiently so let's take a look at a demo of this and then we'll talk a little bit about what vault and folio is okay so we've all seen a url
00:28
shortener before we all know what these look like we go ahead and enter a url in here which is actually going to end up being longer when we shorten this just because of the url here but if you do have a url that obviously is very short it's
00:45
going to look shorter so when we click on that there we go your short link is ready we can click to copy this to the clipboard which is really handy and of course if i create a new tab here and paste this in that redirects us over to the url and we can reset the
00:59
state as well so we can go ahead and shorten multiple urls in one session if we want to so let's talk about laravel folio first of all if i switch over to my editor you can see that we don't actually have any
01:13
routes defined in here so folio is a way that lets you map up your views that you've created so your blade files to pre-created routes so these will be created for you and this is incredibly handy because when you pair this up with something like volt it means that you really only
01:30
need to just create a file and start writing and you have everything ready to go now let's talk a little bit about laravel volt and this is basically livewire but with a functional api that's compiled down to a livewire class
01:45
what this allows you to do is basically write livewire inside the same blade file as your template and then this behind the scenes will be compiled to a class which will run as if you would have created a livewire class and a view
02:01
separately so basically it means you can write php code at the top of your blade files have your template at the bottom where your html goes and you're done so the beauty of working with volt and folio in conjunction is that you can
02:17
basically just create a file write your code write your template and you're done that will instantly be available in the browser to you and you can start building everything out so before we start it's a good idea to be comfortable with
02:30
livewire if you're not already this might be a little bit tricky but you can still follow it follow along and then go ahead and dive into livewire in more detail afterwards but this is what we're going to build let's jump into the next episode and get everything set up
10 episodes 53 mins

Overview

Volt is a functional API for Livewire that allows you to build Livewire components in a single file, alongside Blade templates. Pairing this with automatic route creation using Laravel Folio gives us a serious productivity boost.

So, let’s build a URL shortener while learning how Volt and Folio work!

Alex Garrett-Smith
Alex Garrett-Smith
Hey, I'm the founder of Codecourse!

Episode discussion

No comments, yet. Be the first!