Building QuasarCast.Com - DRY Requests API, Policies and Admin Panel

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
all right hopefully we are live i'm just gonna wait a second to see if uh it comes up on my youtube youtube studio site and it looks like it is so we're ready to get started i was actually just in the middle of doing some setup for this video but now you can kind of see the end of it and see if i crash and burn um i just want to check if this youtube live stream link is working and there we go it looks like it is awesome that means i'm right to get started so where we left off is we had it set up so that you could have a um you could use a view xorm plugin in order to have access to the api all right i'm not explaining that very well so let me just show you with some examples oh watch this apparently i've made some changes here yeah we'll save that um so basically what we want to be able to do is say for example user dot dollar sign get to get all of the users or a better example would be like course dot dollar sign get to get all the courses or um dollar sign what's another one create and then you could pass through some data to create a post so just a really easy simple api for all of those request types so i gave you an example of how you might implement that um but rather than implementing the whole thing i've just included the plugin i'm doing it in a kind of janky way for now until i set up yarn workspaces but basically i'm just pulling in a plug-in that i've used in the past and what that is doing is setting up a whole bunch of requests on our views orm instance um and here they are down here so things like find create update delete but we've also got like bulk create update and delete and even search as well so we'll be able to do all of that functionality which i think is going to be really really awesome all right so i need to finish setting that up and one of the things i needed to include was some just some default configuration here so we want to get data from response function and get api url function and i'm pretty sure that function's going to be fine because we're just returning the api url in our config and yeah i've already set that there so i won't have to change that we just want to have a get data from response function so let's pull through the response uh response this is one of those um things that i can never seem to type correctly i bet you have words like that too where for some reason your fingers don't seem to get around it i need to do it like over and over again oh there we go i got it wrong again all right anyway um next we want to return response dot data now orion actually nests all of its data one level deeper so response dot data dot data and the reason it does that is because within data we have some meta fields like pagination so we need to go one step deeper and get the actual underlying data for that request as well i think that might be it uh let's refresh the page and see what happens all right so we're not getting anything but let's have a look at the call yeah so we are actually pulling something from the back end here that side of things is working so i just need to dig into this and find out why i'm not getting the data from the response so let's see the config file here default config get data from response and it looks like that function that it gives us out of the box should work fine if we have response.data then give us that otherwise response.data so i shouldn't actually need this function at all so what i might do might i might do next is um actually console.log when i'm getting there just to check it looks right let's refresh the page okay so i'm not getting anything at all it looks like it's not even calling that function so let's jump into the getter um and if you don't know what's going on here don't worry this should be um i should be done with this soon so this is the getter here and yeah then we say this dot config dot rest get data from response function and let's see if default function is sitting on rest yeah okay so let's see if our models actually have that um available that rest configuration um let's jump back into here and after we've used the plugin we might actually just come back to index.view i think that's where i was doing the request nope it might be courses dot courses page yeah here it is here and then we're doing a get request here so now let's console.log course dot config and see if that configuration is actually being passed through it is and we've got rest here and we've got get data from response function which makes me a little bit confused because that means that when we finish getting that oh maybe maybe i've still got like a get request sitting on course let's go to course.js no there's no get request on there um how about we come back to our index.js sorry you're gonna have to watch me debug for a little while here while i get this set up and then hopefully from then on things will run a bit more smoothly um all right so we got the plug-in we used the plug-in um we set the api url that's all working fine i might restart the server again just in case that's got something to do with it but somehow i doubt it um let's jump back into here and check that i'm actually installing it properly so when we install it we include um the config as the second argument yeah so it looks like i'm doing all of that correct um what else can i do to check let's check if this is actually getting called i'm pretty sure i already checked that before console.log getting called save that yeah it looks like it's not even getting called there which is very strange oh we're trying to make i don't know that's the user's request so how is that working at all that's not even getting called get data from response um so let's try and dig a little bit deeper into the request itself i'm going to come back in here this is the get request and let's see if we can dive into here console.log um here to see if that gets us anywhere all right so getting a little bit deeper now and now let's see if we can actually call this to see if we can actually get that rest config and we can all right we're getting a little bit closer now and now we're saying this dot persist by and that should be create by default so we should be saying let's console.log we already know that we've got this because i just checked if we've got the config maybe we'll just console.log this anyway to check that it is actually the course object whoops and it looks like it is so then we're saying basically this dot create and the data we're sending through is using get data from response ah it's because i changed that from function to just get data from response i changed the api but i didn't change it in the rest okay that's something i did behind the scenes i apologize for that i'm pretty sure this is going to fix the problem yeah so let's just get rid of the word function there i wanted to simplify the api a little bit but i didn't change it in other parts of my application because i'm naughty ah it's working that's wonderful all right um now we just need to get rid of that console.log whoa and by the way um let me just refresh the page here yeah this error i'm getting here is actually expected um i want to get that error because this is basically me checking if the user is logged in so we just try and fetch the user and if we don't have that user then we basically say um set up our ui in such a way that represents a state in which we're not logged in which is why we have sign up and log in um whereas if we are actually logged in so let me just log in here all right i might have to sign up again before i can do that yeah so now if i refresh the page that request will be successful and if it's successful it pulls in the user and we get this um up here that doesn't quite look like it's rounded properly anyway i'll look into that later on cool all right so we can go along with the to-do list for today and i need to remember where i put it where did i put that to-do list um i think i think i actually put it on my desktop sorry i really should have been more organized before a stream um quasar car stream that's the file alright so this is the stuff that i want to get done today finish building the request plugin we've done that so um just to give you a bit of an idea we can now do bulk create requests bulk delete bulk update we can do create requests delete requests find requests we've all of our models and they are all conforming to orion's api so if you remember from the last time you did a stream if you weren't here that's totally fine i'll show you now anyway because this is super exciting um if i sit into api and i say art route list orion will make that condensed laravel orion basically gives us all of these routes for free these batch routes these search routes and basically i've mimicked those routes um in my front end so i can easily create models that would then do these requests and automatically update the state in view xorm so as we do more of this video that actually might start to make more sense but let's move on to the next thing for now all right so finish building the request plugin that is done i might even add a few lines here just to represent that so we want to write policies for lessons and courses so basically we don't want anyone to be able to create a lesson or a course we only want admins to be able to do that so the first thing we want to do is make it so that a user has the concept of an admin so let's start permeating that throughout our application so this is the user class now if i come down here and find the fields here we go they're at the top i probably should put them at the bottom i think that's how um kia king does it and here's an example so i think i'll just do what he does to keep things consistent and then we'll have here admin and let's set that to this dot adder and that's going to be our false by default and then what i want to do is say static is admin um probably not static actually we want this to be a getter so how about we say um is admin i've got to remember the syntax for this um but we want that to be a getter so we say get is admin and then we return this dot admin so the reason i do that rather than um calling this directly in fact rather than making that a getter we might need to pass through things in the future so i'm actually going to make that a function that then returns return this dot admin so the reason i do that and i'm called this function rather than calling it directly is if we change the way we fetch an admin in the future it's not going to change throughout our application it means that we can only have to change it in this one place but everywhere else we call the function is admin all right so um that should work next thing we want to do is actually set up a migration that adds is admin to the user table and i might actually add that directly to the users table and then re-migrate the database rather than creating a whole new migration for that and to do that i might come down here and say table and this is going to be a boolean that is basically just is oh we'll just say admin or maybe it should be roll so we can have different roles no that's over complicating it so now what we'll do is we'll go to the user factory and we'll come down here and then we'll say admin and by default we're just going to set that to false i'm not even going to use faker to that whenever i'm generating a user i'm going to assume they're not an admin unless i specify otherwise so that's good next thing we want to do is re-migrate the database so i have too many consoles open here let's clean things up a little bit there we go this is app i like to have one for app that's running the server one for apps so i can do stuff and then we'll have api here and now let's say art db wipe and then we'll migrate the database and then we'll see that once it's been migrated there we go so that all worked next thing i want to do is create some let's just try creating my account so i have to refresh the page here um we'll have to sign up again because we just re-migrated the database oh what's going on there cannot read property data of undefined what's going on here so that's the options i'm getting an error so let's open laravel ray and it might give us a little bit more insight in fact i don't know if i've set up laravel race so if i haven't um i might go ahead and do that in this video all right so let's open ray now i think ray automatically logs out errors for us um so what i might do is just make sure i've got it installed laravel ray this is just like a really cool debugging tool which allows you to very easily um debug a layer of application it's like um a fantastic alternative to things like die and dump um so you can rather than dyeing and dumping or just dumping your variables throughout your application you can just call ray and then dump something directly that way um so if you didn't know about laravel ray i highly recommend buying it it's just it's so beneficial it's just it's a no-brainer to get so install the free package let's come in here laravel um and let's require that here i might not have had that required already so let's wait for that to install looks like that's done let's try registering again and see if laravel ray picks up on the problem ah it's not maybe i've oh i think i might need to register my config file i'm creating a config file here we go so let's go ahead and do that and then we'll jump into ray.php um it's set to enabled by default register and i'm still not getting any feedback there all right this might be something i'll do later on because i don't want you have to sit there and watch me mess around with that um all right so what's going on here why was that working a moment ago and now we're getting some weird results hmm if anyone has any ideas let me know in the chat it must have something to do with the fact that i just added the admin field um how about if we go to user.php maybe i need to make it available here no that wouldn't make sense we should probably do i need to make it hidden no i don't need to make it hidden either so how about we go back to the user migration and see if that is actually what's causing the problem r db wipe you always want things to run smoothly in these videos but such is life um and i wanted you guys to be able to see my entire process and just so i've got like a record and then go back in time and see how silly i was at times all right so let's uh try this again all right so that's working it's related to the fact that i've added a boolean value here um so what i might do is look at the register action it might actually have something to do with that but this does seem like a very weird error to me i'm done in the wrong place again wipe migrate and now i expect it to not work sign up register okay so let's um let's troubleshoot this uh where could this problem lie it could lie in let's go to user.php and we might actually want to make it um hidden maybe that's the problem it needs to have some sort of knowledge about it but i've never had any problems like that in the past so i doubt it but we're troubleshooting so let's give that a try um man it's hard to do without ray as well let's say we've got our laravel.log file let's go ahead and try signing up again so i'm not getting any feedback at all we're literally just getting an error which is even stranger um because it kind of makes it harder to troubleshoot doesn't doesn't it all right um so the next thing i'll do is i'll check our register action i'm pretty sure we've got like a register action that we get um out of the box or maybe i need to um make them available um it's not register is it it's like create new user yeah here it is here oh you know what it would be we didn't have a default value when we migrated it ha i've just figured it out so let's go to our create user migration we want a default there to be equal to null i'm not sure why i didn't get better feedback on the front end sorry not no false um so i bet you if i now migrate that see the database ah i've done it in the wrong spot again okay let's um just run the seeder manually there we go refresh the page that's working let's see if we can sign up now okay cool it looks like we have a different error now that's what we want um no we don't have a different error all right so now we're getting access controller orange so it looks like that probably means that the preflight request is having problems which usually means that there's an issue deep around our application this is the hard thing with dealing with cors um when you're dealing oh hey nice to meet you bazaar am i saying that correctly let me know how to say your name bizarre that's what i'm guessing for now at least yeah so when you're doing um when you're dealing with crs it often makes it a little bit harder to troubleshoot because you'll have a problem um when you're making a request to the options endpoint which is this one here and so you don't get a proper feedback when you're um with your preceding request proceeding proceeding request anyway okay so admin should be by default set to false um so we shouldn't have to input that data let's go back to create new user what's happening here email so basically we're creating the validator that validator should pass i don't see any reason that it shouldn't and if it didn't we get feedback anyway letting us know that it didn't pass then we create the user using the name email and password and then in the background let's run into tinker here um this is what it will be doing so here's another way that i can troubleshoot this let's set the name equal to luke debold um email equal to something random and then password equal to be crypt secret there we go let's see if that works okay quarter undefined oh whoops i wrote that wrong b crypt let's get a better c in there ah-ha admin doesn't have a default value hmm but we just set a default value so if anyone's got an idea of why i'm having problems here let me know maybe you can't set a default value on a boolean oh or maybe a default value can't be false because technically a boolean is actually a small int so i need to set that to zero so how about we try that and then we come back in here again and we say art migrate um or we'll wipe the database perth bashar basha i'm having a crack at it bashar basha i don't know if there should even be an accent there um so let's say art migrate roll back sorry guys i know this kind of stuff is a little bit boring migrate and we'll seed it and then let's give it another crack and it's working woohoo okay so the problem there is behind the scenes a bullion is not actually true or false in the database it's actually a tiny int so we need to set it to either zero or one when you're using sql you can't set it to um you we don't have the concept of true and false at least when we're using mysql i'm pretty sure that's what the problem was there um so that's one of those little tidbits which is good to know in fact i should probably make a record let's open the text document there and record that somewhere so i can talk about that in a video later um database uh boolean should be one or zero when default i don't know what that means because we just talked about it all right so we're ready to move along now what well i kind of remember what the next thing on our list was now that's why we write it down so we want to write policies for lessons and courses and that's why we added admins so that we have the concept of an admin so now we want to go to admin uh sorry user dot php and then we want to come down here and have a function that checks whether or not someone is an admin is admin and then we will simply return this admin and i'm going to coerce that by having a double explanation exclamation mark that basically converts it to true or false adding that double exclamation mark there so the first exclamation mark makes it false um or true and the second exclamation mark brings it back to what to the um whether or not it's a true or false value yeah so hopefully that made sense um okay so next we just want to add a comment here check if the admin i check if the current user is an admin and yes we are returning a boolean there so now let's come in here and say art tinker grab the first user in the database and now let's see if we can check if that user is an admin we get false for that user i'm just going to assume that's working because we'll hit problems later on in the application if it's not so it looks like that function's actually working now next we want to have those policies so let's go to por course policy maybe we don't have that yet okay so we have to make a policy we can do that by saying art make policy and i'm pretty sure i can just pass the model like this and the model for this is going to be a um think to myself think to myself of course ah accidentally added a common lower see if i were doing a video here i would just get rid of all this stuff and you'd all think that i'm amazing that's the that's a good thing about doing live streams i don't have that like perfect flow that i usually have man what is the what is this help butterfingers yeah it should be model and then we just say what the model is equal to model is equal to course not enough arguments missing oh gosh i should have actually read what the problem was so course policy and the model we will use is the course model all right let's jump into course policy and now the cool thing about this is laravel orion behind the scenes let me just quickly run you through laravel orion in case you're new to this but i'm going to do it fast because some people are probably watching this after having watched the other videos laravel orion allows us to very quickly scaffold our api so we're very quickly scaffolding a course api here this is the courses controller i'm going to now get rid of that disable authorization because we're actually implementing authorization now and it's automatically going to look for our course policy and use it if it doesn't find our course policy it's automatically going to ban all of our routes which is exactly what we want so it protects us by saying hey you don't have policies for this so you need to implement those policies otherwise i'm going to say no way to anyone who tries to access your api all right take a breath now if we go to course policies we can now implement these policies view any is going to be equal to true i want anybody to be able to view our courses and if down the line we have paid courses then we can start implementing the logic here to say which courses people can use in fact we wouldn't implement it there we'd actually implement it somewhere else but that's for another time our view that's the same thing we want to be able to say yes you can view that course create absolutely not you need to be an admin in order to create so now we can use that function we created i'm going to need a burp so i'm going to take my headphone off for a second and hope that you don't hear me and we're back user is admin so we want to check if the user even is an admin and if they are yes they can create a course coming down here can they update it once again if they're an admin can they delete it if they're an admin can they restore it this is when you have soft deletes and hard deletes and once again if you're an admin force delete if you're an admin so in fact this is one of those situations where it might be better to be able to say something like this public function i think it's before let me just quickly check the docs here and you can basically say um before you run any of these policies check if you're an admin if the person is an admin just let them through um and this can just be like a little bit simpler to write um so how about we come in here and say policies and of course laravel has got just the most wonderful documentation for this kind of stuff and so now i think there's um before nope that's not the one i want oh i've been having problems breathing lately i think i need to see a doctor um every now and then i feel like i can't get like a a successful breath it's hard to explain like i can't get a proper breath in but when i the funny thing is when i'm streaming and i'm constantly talking it's almost like i remember to breathe again so i don't have a breathing problem but when i'm sitting down and concentrating really hard i forget to breathe it's weird like never had that problem in my life i have to start doing some yoga or something all right so basically we can say before any of our other functions are run let's just check if the user is admin and if they are in admin then return true and that actually allows me to say false to all of these other ones um i might even be able to delete all oops not the view one yeah and this is especially good if you have the concept of a super admin so you can say super admins can do absolutely anything but then maybe admins you need to tweak things a little bit from for actual admins um whoops if um user is admin alright so hopefully all of that made sense now we're going to do the exact same thing for lessons and i'm actually going to duplicate this and instead of course policy we're now going to call this a lesson policy and now let's do a little bit of vs code magic to make all of that happen lesson i should tell you what i did there so i'm copying course control um control d allows me to select the next version of course and if i press it again it'll select that as well and if i press it again it'll select that as well so now if i hold ctrl and press d it's just going to go through and select all versions of the word course so now let's change that to lesson and you'll notice that it's changed it to lesson in all of those places now next we want to check if course is used in other ways and it is so once again we use the same tastic tactic there and i'll just do one quick check again and there we go now we've got our lesson policy and it has the exact same logic as the other one so i can leave that as is now [Music] all right so um let's go ahead and check these so let's say art tinker now we're going to do this with postman so i'm going to open postman postman postman does anyone know about the song postman part the tv show postman pat and his black and white [Music] all right so can we get all of the lessons um yes we can however we should not be able to create a lesson unless we are an admin so let's just quickly see if we can say create here and we're going to make that a post request we're going to grab a whole bunch of stuff from here um what else we want to add a body here we won't even bother adding a body because it'll just say that we've got it invalid data if that comes back um if we are an admin all right what am i getting he wants to log something why would i want to log something i need to change the permissioning of that um of my log files um but i couldn't be bothered right now i really wish that i'm the oh wait oh looks like this is working now okay not enough arguments missing name so this is laravel ray it's going to basically print out all of the errors i get from my application i don't know why that's working now but hey um i'll take it i think that just happened then and we can just check that again um okay no that might be an error for something else ah bugger that's a little bit unclear to me unless it's telling me you've got more than one of that error no i don't know all right so let's jump back to postman um and i'm gonna have a quick think otherwise i might just make sure that we've got proper missions permissions on this laravel.log file yeah let's just go ahead and do this properly so api um storage this is a common problem that you'll run into in fact i might do a blog post on this um setting permissions on laravel log file ah ross is back again hey ross how you doing i stream every day at this time um ross is one of my old friends from um from school he's not old but older than like we're friends from long ago all right so we want to make sure that everything within this folder has the right permissions so at the moment it should be set to luke and www.data and it is so why isn't that working laravel.log okay so we need to set it specifically on the laravel.log file um so i'm going to say ch own uh recursive we don't have to say recursive actually um luke ww dash data this is linux based stuff i'm basically saying the user luke and w of the group www dash data has permission to view laravel.log all right so it looks like that worked let's go ahead and try and run that request again and this time we should actually get yeah something different title doesn't have a default value okay it looks like it's actually trying to insert those lessons oh that's because if we go to our lessons controller we've got disable authorization there which is really bad so i'm gonna bring that back to normal keep up the good work buddy what's your blog url we'll have a look yeah it's actually a website i'm building right now so i'm actually showing everybody how i'm building the website that this video itself will be on so it's called quasarcast.com i'll throw it in here if you want to see the website in its current state quasicast.com and it's going to have like some blogs and other stuff like that but at the moment it's just a basic site that shows my videos um but we're making it a whole lot better that's what i'm working on right now all right cool so let's try sending that through again this action is unauthorized okay that's working now that's exactly what we wanted um next thing we want to do uh we've got authorization on the back end working we want to actually test if we have an admin user are we able to make that request so i want to make a laravel sanctum token token so that i can test api requests all right so i don't actually know how to do this yet well i have done it before but it was a while ago in one of my other videos so basically you'll get to watch me learning this as well so api token authorization we want to say has api tokens on the user class so let's go to user.php um and add another thing here has api tokens that's going to allow it to communicate with um uh laravel sanctum tissue we're talking about you need to use the chrome of the togo versus return stuff okay it looks like we just need to call create token on the user so we get our user and we call create token and we give it a name as well so let's see if that works i should be able to say art tinker this seems a little bit too good to be true there might have to be some other setup as well um where email is equal to luke at ldbold.com okay so let's say first all right so that's me i'm going to update myself so that i am an admin and i can't mass update that so let's say user is equal to that user user admin is equal to one which means it's true user save so now uh a user is an admin uh my account is an admin now let's grab that user and run that command which is create token create token and we're going to call this passport it worked and this is probably the only time i'm going to get that token and since we're just in development i'm literally just going to copy that and paste it directly in here for now okay so now we should be able to use that token to actually make an api request [Music] how do i do that uh it's probably going to tell me in here i bet you it's using bearer we probably say have a header called uh token or bearer or something b-e-a-r-e-r that's usually done authorization header with bearer and then the token i bet you that's what it is so let's come back here and there's an authorization section in postman okay check this out we can actually inherit our authorization so let's inherit it from here um and maybe i can inherit it one step further how about this can i create another collection called um authorized um endpoints or something like that and now can i put that in there look like i can oh bye that'd be really cool if i could maybe there is a way to do it but i just don't know about it basically what i want to do is i want to set authorization for this like entire application maybe in environment i can do it um let's try that environment default no all right i'm going to have to set it at least for now for every single section i'm surprised i can't drag drag that nest that that's really dumb anyway okay so we might have a bearer token and i think we could just paste it straight in there so now everything in lesson so this routing lessons is inheriting its authorization from here and the authorization for that is using the bearer token which we got from laravel passport um so if you want you might want to go back and watch this later to see what i did there um same for create i'm just going to author inherit the authorization from here so let's see if that actually works now unknown column api tokens all right so let's think about why that might not have worked it looks like looks like there might be some migrations that we were supposed to do in order to get this set up that we didn't do so let's scroll up configuring i'm pretty sure i registered the migrations before i installed sanctum um sanctum service provider should have given me sanctum routes um how about we go to api database migrations i'm pretty sure we should have something for sanctum here yeah personal access tokens hmm all right let's dig a little bit deeper into this problem maybe we'll get some more information from here i'm going to call them api and taking where clause okay it's on the user model so when i added that has api tokens i'm guessing that's also adding a migration so if i re-migrate the database will that fix the problem migrate nothing to migrate maybe we need to run a migrate refresh art migrate refresh but then we have to do all that again um that's okay we'll do it again uh actually want to come back into the database though and check uh that we actually have those columns showing up now look my dogs are running off this is where no sql shines no need for micro yeah i look i've been on and off about nosql the only thing i don't like about it is i feel like there's a lack of structure and it's way too easy to um uh to change things and move things around and basically mess up my database um i don't know there's probably there's a lot of arguments for both sides um but yeah you know maybe maybe no sql would be better for a site like this but yeah there we go um all right what am i doing again i put myself off track now okay so migrations oh man my totally just mind blanked we were running that request okay so um it's telling me that the users table doesn't have api tokens so let's come back in here and make sure that we've gone through the installation process okay um all right so i did run that i remember that migrations if you're not going to use synchronous default migrate yeah that's fine overriding default models that's not something that should matter for us api token authentication um has api tokens trade we've i'm pretty sure that we've actually got that going so we go to user.php has api tokens okay so we've done that um i did just re-migrate the data oh we should actually check the user's table to see if it actually shows up there now so let's say art tinker user factory let's create just one create it's not showing up there but it might not show up there it might be something that i that's actually hidden so next thing i need to do is open up uh mysql what's a chord oh there's like this sql program that i've been using lately oh that's alright i'm just gonna use mysql workbench um all right so let's go to quasicast whoops um and now we'll go to the users table and it looks like we do not have that tokens field that it was looking for let me know if you guys have any ideas but i'm going to keep plugging away at this for now and trying to figure it out uh let's go back to the docs and move along i probably should have read the whole thing but create token works so if create token worked then you'd think that it would exist in the database token abilities that's not related to what we're doing hmm com api tokens gotta admit i am a little bit at a loss right now that's all right this is the stuff that happens when you are developing um what else can i do so that's definitely being implemented we could check if i actually did register the service provider it's possible that i somehow missed that or maybe i need to set something in the sanctum.php config all right so let's try um running this again thanks for those of you that are sticking around i definitely really appreciate it oh let's paste that straight in all right looks like that did actually make the migration so maybe it checks for the the class and the user model which is why it didn't do it the first time and now if we migrate it we're still getting that so let's say art migrate refresh all right and now let's see if it's showing up now let's refresh that and see if those that column is showing up no it's not that's so weird database migrations let's have a look at maybe it's something that i'm supposed to add in manually migration um that's customizing the migration if you if you're not going to use sanctum's default migrations you should call the i'm pretty sure i'm definitely not doing that i do not remember doing that ignore no so that's not the case what else could it be i thought i was having which to store man this is bizarre maybe i wasn't supposed to add it to the users table maybe i was supposed to add it somewhere else i'm pretty sure though um it belongs on the users table let's go back up here um whereas it has api tokens trade oh am i extending authenticatable user.php yep i'm extending authenticatable laravel sanctum has api tokens it's pulling it from the correct place can you elaborate on what the problem is again okay so the problem is um laravel sanctum which is what i use you know i'm in order to use authentication it's working for spas but it looks like in order to use it um to authenticate users using something like laravel passport so directly i'm not using an spa we want to be able to use a bearer token which is what i've got up here adding in the bearer token so when i say create here it's saying okay cool it looks like you're trying to authenticate as a user but i can't find this api token sitting on the users table so it's looking for the user it's looking for the api token column on the users table which should be automatically mic added to our migration um when i add the orion when i add the service provider with sanctum at least that's what i'm pretty pretty sure it's supposed to do uh yeah so that's my that's my current problem here you know what it might be something that i just need to add um manually so yeah okay let's scroll down a little bit further there might be something later on protecting routes no let's see what um commands we have available in sanctum let's say art sanctum uh we can say art i'm pretty sure we've got a list of sanctum commands here ah sorry about this guys i really wanted to get more done today but that's the way it is it doesn't look like we don't get any um sanctum commands all right so let's dig a little bit deeper maybe it's because i already have a user table and i need to do it i needed to do this earlier on you know what a solution for now might just be to manually add um oh wait what's this here i know that's for using a custom model all right i'm going to go back to the user um class and check that again so use um ah what was it called again has api tokens just check if i've missed anything there i'm pretty sure i double triple check that though that's definitely what i'm doing we're definitely extending authenticatable has api tokens notifiable that should be completely irrelevant to what we're doing okay so [Music] yeah this is basically assuming that everything's working now you know what i'm just gonna for some reason maybe it didn't work when i migrated before migrate roll back and let's just try migrating again jump back in here um it's also possible that mysql didn't update there and it actually was added to the table if that's the problem i'm going to be super annoyed um no it looks like it's still not there man bugger so i've done this in previous projects it could also have something to do with a service provider that hasn't been registered properly if you're not going to use a maybe we can just run this to get the sanctum migrations oh whoops we run it here um so that should show up there now nope didn't show up at all sanctum database migration should now be showing up in our migrations so it's almost like that command is simply not adding the right migrations in there or perhaps it's because we've edited this file now you know what let's uh man i'm spending way too long on this i'm just going to create a jimmying solution here and actually find out what that um migration does so we go to sanctum database migrations here's it's only got that one migration i reckon it just expects me to create the migration myself but why would it not say that in the documentation i mean laravel's always really good at this um it's called like api underscored what was the name of that or maybe it's because we're not actually using sanctum on that route oh my gosh i bet you that's the problem oh man um it's because i reckon it's because we're not adding the correct middleware here to say that we're actually supposed to be using laravel sanctum on this route i think that might be the problem oh man this is just embarrassing all right it looks like we have a different issue now route login not defined okay it's trying to send me to the login route all right cool i think it's working so the problem now is that it's trying to send me to the login route because we don't have an admin because we've re migrated the database oh god i'm so excited to move on from this problem all right so now we can say user is equal to um you know what let's just do it this way because it's going to be super fast to do it this way and we'll come in here and we'll say sign up and create myself as a user and we'll say user first um there i am there and then user create token and we're going to call it passport now we can grab that token and we can jump in here and we can set that token there so now we're using the correct token let's come back to our create request and send it through oh my gosh it's the same issue all right so we should be using the earth sanctum middleware which means that it oh man look honestly i might just stop this stream figure out the problem because i hate keeping you guys waiting watching me kind of flounder around um that would really suck and it might it might be something really simple so let's just see if i'm using the middleware correctly there ah middleware groups um so group i should be able to just add in options like that middleware or sanctum um i know it's not a migration issue because otherwise i wouldn't be able to issue tokens in the first place so it's got to be a sanctum it's got to have something to do with the fact that i'm not protecting these routes correctly with sanctum i really think that that's got to be the problem let's get rid of that group section and just change it to middleware for now to check if that is the problem um i actually can't just copy paste that in because the format is different how about we run route list to check that it's correct quasar cast ah list route list oh we need to jump into api cd api oh this is not my proud my brightest hour but you know what i think these are the moments that make us stronger i'm going to be super determined to make sure i'm organized and like in the zone next time so i'm just going to get better and better at this and my videos are going to get better and better all right so they are being protected using um sanctum [Music] so maybe it's got something to do with how i'm trying to authorize maybe they don't want me to use a bearer token it wants me to do it in a different way um so let's come up here uh let's go back to where i said bearer they don't even have the word bearer on this page oh i'm on the middleweb page bearer should be included in the authorization header as a bearer token let's see if there's any more occurrences of that all right that's just saying that we do it the same way when we're using man i'm really impressed that you guys are sticking around thank you so much for like you know it's almost been like 20 minutes or even half an hour that i've been trying to solve this one problem so yeah i really appreciate it um no i don't think that's the problem we already know that we're getting the right token back hmm it might have something to do with our kernel ensure so that's just ensuring front-end requests are stateful but this isn't a front-end request it shouldn't matter um is there any other place where we've got kernel no that's telling me to do the exact same thing how about we look for middleware just to check if there's any other middleware that that it mentions next you should have sanctum's middleware to opr yeah no that's just the exact same thing we're looking at before just talking about broadcasting and it's auth sanctum middleware in order to protect those routes my spelling middleware correctly yeah i already know that it's being protected by the middleware um man i'm super like running out of ideas here um what if we yeah i've already got it set to bear a token let's just check the request itself and see that it's actually authorizing the way it should we got eight hidden headers authorization bearer and then the name of the token that's exactly how it should be um man i'm honestly so confused by this um maybe we can dig a little bit deeper into these files to try and figure out where in the query it's getting wrong you know what really i should just be googling this i'm kind of embarrassed i didn't even think to do this earlier okay maybe it's because i'm on like um youtube so i feel like i can't google things so column not found so let's just set the word sanctum in front of that oh it looks like i've hit this problem before so they're saying that if i go to auth config api should have the driver sanctum auth.php oh my gosh oh my god i can't believe i didn't google this earlier oh it's working oh that's so embarrassing oh why did i miss that in the docks is it just sitting there in plain sight auth.php no it doesn't say anything about it maybe that really should be written in the docs because i even added it within the middleware okay but that was adding it to the middleware is probably just going to make sure that it will work when you're using front-end requests i guess when you're doing back-end requests you need to add that in all right so i'm gonna do a blog post on that as well blog post on this issue oh man you know what we get smarter and smarter though the more i add things to this list and let's keep writing blog posts okay um i'm just going to keep pushing along thank you so much for sticking around those of you that did stick around let's have some fun and you know hopefully actually start building something exciting out of this all right so now we can do a create request um we've got the api token already set up did i end up re-migrating the database no i didn't so that api token should actually be authorizing me unless i'm not an admin which i believe i'm not so user admin is equal to true and then user save all right so let's come back into postman and then let's go to create send there we go now oh that's not cool okay so now we can actually put in a body for this request and see if we can actually get it working and then i'm just going to move on so text let's just set this to adjacent body and let's try putting in a title is equal to my title send now it needs a slug let's set that equal to um beep boop send um now it needs a description so let's set that to blah blah blah it also wants a provider id so we'll set that one to youtube oh man i wish i got this stuff solved quicker so i could have showed you all the cool stuff i wanted to show you today but who knows i might have time in the end um then we want the actual provider itself oh sorry i did the other one wrong so that's going to be youtube and this is just going to be like a random string published at published at and i might be able to say like um year month day is that how you usually do it 2020 march um 20 something like that field length and then we want the length of the video as well so let's say the length of the video is that long course id ah this is gonna need act we're gonna actually need to have a course as well so let's say um let's go back into tinker course factory create um and so that's probably going to have an id of one and there we go so we now actually can do that create request oh finally i can start moving on and that means that that should be able to work on the front end as well which would be really really cool now let's start culling some of these tabs here and we can go ahead and move along to the next thing so what was this write policies for lessons and courses that is now done build an admin channel panel for lessons and courses so when i have an admin panel so that i can actually update this data so how about this we create another site just for the admin panel this will be fun i can now cd into quasarcast.com and i can use the new quasar for this so let's say quasar create admin and we're going to use the next branch so by using the next branch i get the latest version of quasar which actually uses view three under the hood um so i have to use the composition api which i'm not totally used to but um this is a really good chance to to get the hang of it so now we can say this is admin project product name admin um app that's fine let's just call this quasar cast admin app admin app for quasar i mean that's pretty obvious look at ldiva.com um we use sas uh we want to have view x by default we want to axios by default oh sorry not typescript and not view international cool i like to use the standard eslint to plug in and yes we're using to install this always use yarn for local packages and npm for global packages that's a recommendation from the quasar community all right so then we're gonna end up with a new admin app and i can start building that and i'm not gonna do all the authentication logic around that because it's actually pretty complicated because basically i want to say if people try to go to my admin site then say no way otherwise let them through we're going to need another nginx file so let's duplicate this we'll call this admin [Music] okay we duplicated the wrong one so we want to we want to duplicate root and change that to admin and we want to call this admin dot quasarcast.com that's the certificate i just do some super loose stuff with certificates it's not very secure but it's this just for local development um i basically have a certificate authority which i can install on all my devices and then they all use this wildcard quasar car certificate and meaning i can test this on all devices quite easily and just use the same certificate authority everywhere it's really it's a really cool way to work all right so now let's say sudo service nginx restart throw my password in there and i think that's all i need to do to get that set up oh we need to change the port here um so we're going to want uh jeff's dot env plugin so let's come in here admin and we're going to say quasar extension add at quasar dot env all right so saying it's already installed because i've been trying to set this up as a mono repo so all my packages are actually installed um in the same place which is really cool because it means apps packages admin packages they're all relying on the same um they're all getting their packages from the same node modules directory but more on that another time all right so we're going to call for development we'll call this dot develop no no let's just call this dot env and then we'll say dot production dot env for our production one common root object i always set that to none and yes you can create my env files for me and yes add them to git ignore that'll be helpful all right so now let's jump into admin dot env and let's just basically copy what we have in app dot env for now i do a few things with certificates so that when i'm running a dev server i use those certificates and when it's in production i don't use those certificates i'll show you the code for that in a second and the port we'll use is 6061 for the admin server um that's all correct api url and yeah i think that all looks good cool so now we can come in here quasi.conf and i'm going to steal some code from in fact let's throw these side by side app quasar.conf so we want to make sure we can use environment variables so i'm just going to i don't need that i already know how to use a quasar.com file get rid of it there as well uh yeah so basically what we're doing here is if we're in development we're going to require the dot v and env package um because we're going to need to use some of those env variables um file system i'll show you where i actually use all of these in a second so we come down here what i do is i say when i'm running a dev server then i want you to use the ssl certificates i have locally otherwise don't worry about any of the https stuff in fact just ignore it completely and yeah basically if i'm not in development mode that means that uh it's not going to try and use ssl certificates and end up throwing errors for me so i'm pretty much just going to copy paste that code in dev server all right and it's automatically going to pull the correct port for me let's see if i set all that up correctly this is a really great way to develop if you can um get it set up but that's a video for another day oh what's wrong okay so store yeah it's just creating the store flag which is fine um so yeah while i'm at it i might actually go to app slash index for the store and copy a lot of the code here so let's go admin slash index for the store and first i want to test if it's working so let's go to admin dot quasar cast dot test all right of course that doesn't work nothing ever works the first time um i need to add https there all right so i'm guessing the problem now is an nginx problem it looks like it's not picking up my nginx config file that i have for admin here uh that should be 6061. so we want to make sure that when we go to admin.quasarcast.test it's sending it to the right server there so let's come back in here and say sudo so yeah let's restart nginx again and refresh the page uh quasar car oh the nether thing the other thing i need to do is open my hosts file you could use something like valet for this but unfortunately valet um is a little bit too inflexible for what a lot of the things that i need in my system um so i don't use laravel valet maybe later on i'll try and use it and configure it more to my liking but for now i can't use it uh so let's come down here and we'll say admin dot quasar caster test um that's going to that'll send me to the right place now when i try and go to it in the browser ah and it's working so there we go this makes it a lot nicer to work with that means that we can use a url that means we don't run into any like ssl certificate problems that you often get when you're developing i believe it's worth the extra work in setting that up um yeah setting things up properly with nginx or laravel valet okay let's move on to the next thing so we now want to make sure that we're using the right router technique for admin so let's say quasar.conf and we want to use history mode so rather than having this hash mode for all of our routers i'm going to change that to history and my nginx config has already um been set up for that so that's going to work for me already and let's just wait for that to load that's loaded refresh the page and if i get rid of that hash it should still whoops it should still work ah test cool now let's just do like a little bit of um scaffolding related stuff i'm going to delete basically everything from the menu we don't want anything in the drawer i'll keep it for now because i probably will end up using it let's leave that scroll area i don't want that oh wait hang on i've gone to the wrong main.layout file uh main layout for admin all right so let's just call this admin i don't need to display the quasar version uh you know what let's steal a whole bunch of the logic from here let's see if that just works straight off it's actually it's not gonna because i'm trying to report a whole bunch of things that i can't import how quickly can i get this set up so let's go to app now and let's go to source models and let's copy that and use those models inside of admin from memory we had a model alias so let's go back into quasar.com for app um where is it it's down here and if we go to our aliases i'm going to copy that code and then jump into quasar.com up here extend whoops extend webpack oh i think you do aliases a little bit different in the new quasar so let's jump into quasar version two and we'll say alias is yup adding webpack aliases so let's go to our build section and then to extend webpack and it looks like it might actually be the same um build okay so it's got chain website packages it simply doesn't have extend webpack by default so i should be able to just paste that straight in there and it'll just work hopefully um apparently we've got errors in this file what are my errors okay so it looks like i forgot the parentheses there okay so that's for that and then that's for gosh i'm stuck in parentheses parenthesis hell that's for that and then that's for that right oh my gosh what have i done so that object that connects to there and then this parentheses should close off there hmm i don't really see how that's oh that's wrong oh this is just a function it doesn't need a closing parenthesis ah [Laughter] all right let's run crazy.dev again and we're going to call this alias models source models directory for that alias so now we should be able to use our models and i've just imported those models in the future i probably want those models to sit in one place but i'll sort that out later we're just going to duplicate code for now but of course we want to have like a models directory one level higher so that they can share that logic or even have like a separate package for it all right let's refresh that page and see if it works what's that issue now all right so next is some of those components uh so we're just gonna have to run into that jump into that file and start culling things that we can't actually use yet okay so we should be able to use all of that um access is imported so that should be correct handle lesson changed that's irrelevant to the admins page uh get the session user yes we'll do that um session user yes we want that that's code to actually get the session user current tab we're not going to have tabs on this page route params i don't think we're going to need that selected courses and these are the selected lessons all right so most of that's cold um i don't think i'll need that we won't need tabs and we won't need tab uh mini course drawer we also won't need essential links um i won't need that either we can get rid of links data i'm going to hard code a lot of this for now it has requested session user yeah we'll keep that ah am i still able to use this format actually i might have to use the new views oh man i'm going to use the new view syntax here so let's go into components um and use the essential links component as an example here yeah so we want to import define component and then export default define component like that so let's come up here we don't want that import um what did it look like yep that code there courses um we don't need that register button we will here oh we don't need that either actually um so let's find that where it's being used we don't need that there register button and login button we're not going to need either you won't even be able to get to this page unless you're an admin so let's save all of that lessons menu that's not going to be there anymore we're almost there what else have we got here all right looks like we've got an error here looks like i didn't close it off i think i need to have a close parenthesis there yep login button we don't want you at all on this page honestly it probably would have been faster than just build this from scratch all right so let's save that okay apparently you can't find models user so we might have to run that again in order to get our aliases but i'm pretty sure that we've got our aliases set up properly now yeah and if we go to models we have actually got the user in there oh it doesn't like my formatting doesn't like that formatting either what's wrong with that expecting an assignment or function cornerstone sorry okay that's something i'll look into later on um looks like the lint is doing a lot more work for me now than it used to which is really cool some new benefits of the new quasar and there we go so let's jump back in here refresh the page oh no wait we gotta ah okay it's being super strict about um about me returning a function here all right so i might actually be able to say expected an assignment or function core okay we need to return that i'm pretty sure yeah okay that was the problem sweet there we go all right now we're getting somewhere this is going to be our admin page um now we need to actually start implementing the vuex stuff as well so let's go to store index oh man i don't even know if ux orm is going to work with the new version of view so i might actually have to use the older version i don't even think about that oh man silly luke if that's the case i might end up finishing up this cast because otherwise it's going to be way too long for you and i do not want to bore you to tears we want to keep this at least remotely interesting okay so let's say store slash index.js on the app file and let's see all the stuff that we're doing here um i already understand all of that stuff so let's pull in the plugin the vixx rm rest let's pull in view xorm as well let's make sure we actually have that plugin so yarn add at view x dash rm slash core i believe it is so let's come in here and say vox rm and make sure we have that installed properly uh installation yeah here we go i'm just gonna run that it is slash core i had it right probably could have just ran that comma command and seen if it worked um so i just want to make sure that's added on the admin side so we'll be able to model our data on the front end what else do we want to do we want to actually say view dot use and hopefully that's done the same way it might actually be done differently now so we want to import view there am i in the right index file yeah admin store yeah index store all right so let's import view i don't know if i'm gonna have to do things differently here i'm really hoping that that i do not oh no sorry we're not using view x in that way so i might not actually have to import view that's all being handled for me now i want to run all of these imports so let's just copy paste over that section cool so that's all working and now we want to say view x orm make sure that you're using that plugin and then we want to initialize the database and register all of those models so that we'll be able to use them on the front end looks like we're running into issues now yeah i'm not sure this is going to work with the new version of view with view three but i'm pretty sure kia king will be on to that so it should be working soon this view x what am i doing wrong here let's just try running that again from scratch and they look like they're pretty similar now and we just want to make sure that vox rrm is being installed there properly and it is and while that's yeah okay hmm all right so let's just quickly do a google to see if this is going to happen soon view xorm view 3 we might have to use the next version to get that working currently yeah okay since they're not adding features it might not even work with the current view man i'm gonna have to recreate this package basically i'm gonna have to recreate um admin and use the old version of quasar which is really really sad until the new version of ux orm is available um if that's not going to work let me just quickly do a little bit more of debugging and see if i can figure this out i don't know why it's talking about single file components that shouldn't have anything to do with any of this in fact let's comment all of that out comment this out and see if we get green now now we're getting the exact same problem so it might have actually something to do with um something else let's go to main layout hmm that's not even refreshing at least i don't think it is all right so let's try running it again but we got main layout working before let's just try running yarn there already up to date quasar dev let's bring this back to how it was originally and see if that's going to fix the problem so this is a new error it might have something to do with um the fact that i'm using workspaces now okay so maybe it would be a good idea to delete workspaces and bring us back to normal so at least for now i'm going to delete the concept of workspaces [Music] and then i'll come back into admin delete my node modules folder and we should have a yarn.lock there it is there and now let's just run yarn again so now this is just going to use um this is going to use it locally oh one of the problems i might have had is that i didn't actually point our workspace to admin probably should have tried that first anyway oh yes thank you for finding that out for me that's really handy thanks scott oh i hope i'm allowed to say your name well everyone should know who you are you do so much work for the quasar community um constantly like in the forums i maybe i remember you giving me help when i was first starting out with this stuff so um yeah this guy um who's in the chat at the moment m8a he's an absolute quasar legend and he does a lot to help us get the name of quasar out there so um big thank you to him big shout out to scott i just use your name again i hope that's okay i'm gonna stop saying it now otherwise i might have to delete this live stream no problem okay good i don't know some people um you know are pretty iffy about about privacy and i need to be careful about that and thanks for looking that up that's like really kind of you oh how long have i been sitting on here now for we've been going out for almost an hour and a half man we've run into some serious serious problems but you know the cool thing about this is um all the stuff i'm learning here all the problems i'm running into if i'm recording them all down so that later on i can start creating videos and blog posts and people are going to search for similar problems and they're going to hit my youtube videos and my blog posts and they're going to be able to fix their problems um so it's really awesome that we're hitting these problems i and i honestly see it like this is an important mentality i believe um as a coder it's really important that when you run into problems rather than thinking ah crap and getting upset and i admittedly i do that sometimes i might do it a lot but it's important to have a mentality of problems are good like we're finding gaps in our brain and every time we find a gap in our brain and we solve a problem we do some researching we are filling that gap in our brain that is literally what it means to get better to get more skilled so every single time we find a problem and there's something that you can't fix and it's difficult you are literally becoming a more skillful person and then if you share that with other people you are in a very real way making the world a better place because you're making the world more skillful and so i honestly love it when i hit problems because it's an opportunity for me to become more skillful um and i like to think to myself a lot of people would just give up um i'm not going to give up though i'm going to keep like pushing through and solving these problems so yeah i love problems i love it when i can't figure things out i love it when i'm hitting my head against the wall for three or four hours and this happens this happens to me at work it happened to me today when i was doing like um trying to figure out how to do some complex warehouse queries and they just wouldn't work like i was ending up with i wasn't ending up getting all the records that i needed this is a good thing because it means that when i figure it out i am so much more valuable to the company now and i'm so much more valuable to you guys because i'm going to share that knowledge with everyone so yeah if you can take on that mentality you are going to become a much much better coder yep that's why i like doing support for quotas i learned a lot more from yeah and and you know a lot scott like i've seen you in the community and it's like how does scott know about all these tiny nuances about quasar it's like and it's it's true like the way you figure it out is by teaching people and by constantly digging into it you know i know a lot about upgrading quasar because i built a whole series on upgrading quasar and that's not because i'm smart honestly i mean you see me today a lot of you have seen me completely get baffled and fail over some silly little problems i was a total dumb dumb when i was a kid but because um through for some reason like i remember reading this book when i was younger by tony bazan it was called the mind map book and i don't know why but it just made me believe that i can learn anything and then all you have to do is just keep keep at it again and again have run into problems come back the next day and then your brain will start finding those gaps you go to bed that night it works on those problems over and over again and now i'm really good at upgrading quasar apps and i believe that any person on the planet i don't care how smart you think you are or how smart you actually are any person on the planet can learn how to do this stuff by simply putting time into it and and going at that problem again and again and again just going at the problem until you can figure it out so there we go that's kind of me um going on a pedestal for a moment now let's see if we can actually fix this this problem here and thank you heap scott from digging up that information for me so i can try and um try and fix it now so we're going to bring back our we're going gonna bring that code back again um there we go man i just need to like rest my voice for a second there went on a bit of a rampage maybe this is related to the webpack aliases uh maybe like perhaps i did that wrong and that's why i'm getting this issue let's run that again no i'm getting the exact same issue what did i do let's go to main layout and can i is there a way that i can replace this really simply how about this we just have the q page container and we'll comment everything else out view loader requires okay i think i need to run yarn again but in store peer dependencies oh once again you know what let's just google this problem to be present google will fix that up okay so let's say yarn add i've got the feeling i'm doing something wrong here but i just want the problem solved fast so let's say yarn add view compiler dash sfc you know what i think quasar actually installs it automatically for us but i lost the installation when i deleted my node modules file and deleted yarn.lock it's probably got something to do with that um so let's try quasar dev again and there we go looks like we're not hitting that problem anymore but we might end up hitting a new one related to view x cross our fingers it'll work this time ah sweet we're getting different problems create router okay so router index um yeah you know what i i think a lot of this is related i'm a private pilot and there is a saying among pilots it goes a great pilot is always learning same goes for any jobless skill a great developer is always learning oh absolutely 100 um in fact what terrifies me is to stop learning i get this really uneasy feeling at the pit of my stomach like when i haven't been learning for a while it's like i don't even know how to explain it i just start feeling uneasy and i start getting really fidgety when i haven't learned something new i get like honestly i feel useless maybe this is like some problem in my psyche just like this there's something like i'm not making myself as useful as i could me to the world um anywho yeah i feel like this stuff should be supplied for us via quasar but for some reason it's not happening i'm going to come in here again and delete yonder lock [Music] and delete node modules run yarn again i might just have to go back to um the original version of quasar but i do really want to push to using the new one as much as possible i want to push myself to learn the composition api um because you know what it's like um when you want to learn something new part of you sort of you know has some pushback to it and i never want to become that person like i never want to become that person who's on twitter saying oh composition api now we need to learn something new blah blah blah be like dude it is so useful especially for large projects it is so useful to be able to just share code that easily and you know to start getting better type hinting and all that jazz so you know it's one of those things just learn it sometimes as a developer we need to learn new things so i'm excited to learn it quasar dev maybe i'm not maybe i don't have the new version of quasar cli installed let's um quasar no i've done a video series on this so i'm sure i have the new version ah okay router index.js it's telling me that create router doesn't exist was not found in view router i mean they are warnings is it still working no where are we getting that problem though in create store yeah i think it's almost time to um call it a night it's eight o'clock over here and i've been going for an hour and a half ah man i'd really like to get some of these problems solved um but some of this stuff honestly it's probably better i do behind the scenes so you don't have to sit there and um you know watch me fumble through it some things are good for live streaming some things i think are better as their own personal videos so um yeah but oh by the way guys i really need to let you know about this i'm starting something called the quasar show and basically it's going to be a really clean show um not like what i'm doing today uh where i basically run through new stuff in quasar it's going to be the kind of thing where you can come home at the end of the day after work sit down and watch it you can be in front of your computer if you want or you could literally just like watch it on your tv through youtube using a chromecast or whatever the plan is um oh quasar info yeah sure i'll do that for you quasar info um let's go control t cd admin quasar info so you get some more space there you can actually see that's what i'm getting that all looks good to me yeah i'm using the latest version of quasar no anyway yeah so um i'm i'm going to be doing a a quasar tv show we're going to talk about a lot of the latest things in quasar and i'm just going to run through like some little tips and tricks that i've learned along the way learning quasar and it's going to be like probably an hour to two hours long and the idea is you don't have to sit there with a code editor open you can sit there and watch it and it's more just like something fun so you can be like oh cool that's in the quasar community oh cool that's like an awesome tool that i can reach for if i need to use it um you know like little things like that i think it'd just be really fun to do a tv series like that and it's not just going to show the code editor you'll actually get to see my face and i'm going to like talk about some concepts and and i also want to spend some time talking about the latest and using quasar and also really importantly talking about the life of being a developer and the mindset behind being a web developer you know it was and just being really real like sometimes you have situations like today where we've just run into problem after problem um and you know it's kind of been nasty but the cool thing is we learn along the way we um can write blog posts about the things that went wrong and then later on down the line we can find our own blog posts um shouldn't view xb version 4. hmm i think you're right but yeah it's going to be awesome so that's going to be the the quasar it's going to be called just the quasar show i wanted to keep it a really simple name and yeah i'm looking forward to it view x um let's just take view x github yeah you're right that should be version four uh what about view router what's the latest version of view router it's three so let's have a look here i'm using 3.2 which seems a little bit old and ux is three point so why do you think that do you have any idea scott of what that might be why would quasar be using an older version of ux um because yeah this shouldn't this shouldn't work with the older version of ux let's also say quasar viewers view too as well oh you're right what's going on here it's almost like it's not detecting that it's a um that it's a beta package so how does quasar know that it's yeah there we go saying here that it's quasar beta so that should be picked up when i run quasi-info anyway i'll run on to i'll get onto that a little bit later on so yeah thanks everybody for watching and by the way if you're somebody who's watching who's using quasar and benefiting from it have a chat um with whoever you work for or if you work for yourself have a chat with yourself and see if you can just say hey we are getting thousands of dollars worth of benefit from quasar do you reckon we could just donate a little bit to the community um do you reckon we could donate to the developers of quasar like i i honestly am baffled by the amount of flexibility and and utility we get out of quasar for free it's honestly mind-boggling there are frameworks that are far less good less good that are definitely not as good as quasar and and people are paying huge amounts of money for it we can export this to a mobile application when we need to a pwa um we can use it as an spa and it's not just an spa as an afterthought quasar is a fantastic first-rate sba it is and it's got a huge component library we can make a desktop app we can even make a a web extension on chrome or firefox i mean that that's that's insane this is all for free and i really believe that we need to start stepping up and turning the open source world into a world that is funded i think it's very very important and it's quite serious too because if we don't do something about this then more web developers are going to get disheartened and projects are going to be forgotten now i've talked to the creator of this um i've talked to the creator of this project razvan and he has poured his heart and soul into this project and he's 100 dedicated to it and i believe someone like that who is pouring their heart and soul into this project um should well i think we should be throwing money at them i really do um i'm currently looking for ways to get more income by the way just to give you a bigger vision of what i'm doing here i want to start creating this website quasicast so that down the line we're going to have a subscription service where we'll have free videos but then if you want to go deeper we have paid videos and my plan is to give as much of that money as possible in fact to begin with i want to give all of it to the um quasar community uh until i reach a point where i think that they're getting enough money that justifies at least somewhat justifies the work that they're doing all right um so please if you're getting um if you're getting benefit from quasar go over to the sponsorship page uh or you can even pay by paypal if you need to and throw some money their way like i can't even tell you how much it helps if everybody donates a little bit this is why we have website websites like wikipedia as well which have made knowledge open to the world this is extremely important um something i'm really passionate about it's very important so please um if you have the means just consider donating to quasa in fact you know what go to github and do it right now otherwise i believe that every time you don't do something because you think to yourself i don't i'll do it later you start generating the habit of being someone who puts things off i used to do this all the time a classic is like washing your clothes and putting them on the white on the clothesline you keep saying i'll do it later i'll do it later i'll do it later and you never end up doing it like i used to do this all the time as a kid and even into my early adult years you have to act now otherwise you will never be the kind of person that acts and gets things done that's why i'm sitting here streaming because i've committed even if it's a messy stream like today i've committed to streaming every single day at 6 30. you need to make it happen and you need to act so go over to the quasar github page actually you go to quasar.dev and there's a sponsorship link and make it happen right now and help make the quasar community a better place and another way that you can support us is watching these streams and when i do start releasing paid videos just know that a large sum of that money is going to go to helping the quasar community and it's also going to give you a huge amount of benefit i believe i'm thinking about giving people a free t-shirt if they sign up for like a three-month membership or or like a one-year membership as well i think that would be really cool um just to give people like a bit of more of a connection with the with the quasar community so thank you so much for watching i can't believe that there are six videos that have stuck around for this long despite this video being a little bit messy i really appreciate your attention i don't take it lightly i'm going to take the stuff we've learned from today do blog posts do some separate videos and next time we're going to dive into something a little bit more fun which will be building the admin panel out for our courses and lessons thanks heaps for watching i really enjoyed this one and
Info
Channel: Luke Diebold
Views: 129
Rating: undefined out of 5
Keywords: quasar, laravel, vue, sanctum, orion, REST, API
Id: BQK6pReNa28
Channel Id: undefined
Length: 107min 15sec (6435 seconds)
Published: Thu Mar 25 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.