Тёмный

API Call to Ensure Unique URL (Ep 24) - Build an Advanced Blog/CMS 

DevMarketer
Подписаться 68 тыс.
Просмотров 13 тыс.
50% 1

Today we are going to build an API Endpoint to test if our blogpost slug is unqiue. We want it to return true if it is unique (indicating we can use it in our post), and false if we can not use it because the slug is already taken by another post.
In our Vue.js component we are going to refactor it so that only set the slug by using a setter method. THis allows us to only write our API call once, and validate it in our setter method. This simplifies the code significantly and makes it easier to maintain.
==== MORE FROM THIS SERIES . ====
Full Playlist for the "Building an Advanced Blog/CMS from Start to Finish" Series:
• Build Advanced Blog/ C...
==== DOWNLOAD SOURCE CODE ====
Download Code from this Episode:
github.com/Dev...
==== FOLLOW ME ====
Subscribe for New Releases!
Subscribe to DevMarketer Insider
confirmsubscri...
Twitter - / _jacurtis
(ask me questions!)
==== QUESTIONS? ====
Leave a comment below and I or someone else can help you.
For quick questions you may also want to ask me on Twitter, I respond almost immediately.
Email me hello@jacurtis.com
Thanks for all your support!

Опубликовано:

 

7 окт 2024

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 21   
@sithidethbouasavanh5558
@sithidethbouasavanh5558 7 лет назад
The backend slug uniqueness validation that you mentioned at the end of the video can save us http request overhead. I hadn't thought of it until you brought it up. Great tutorial.
@AyorindeAdesugba
@AyorindeAdesugba 4 года назад
Best series by a mile. Shame it ended abruptly...
@prakashale1627
@prakashale1627 7 лет назад
You are the best alex, can't wait for next videos
@iendor135
@iendor135 6 лет назад
Hello Alex, tudo bem? Estou aprendendo bastante coisa com seus tutoriais desde que conheci seu canal onde assisti o tutorial laravel multi-auth, estou no Brasil e coloco pro youtube a legenda em português para entender mais suas dicas e explicações. Você é um ótimo professor, respeito e admiro seu trabalho, continue assim parabéns. Abraços, e aguardo os próximos passos :)
@geleyibu1978
@geleyibu1978 7 лет назад
Thank for you works! Best tutorial on the web!
@KordiganOP
@KordiganOP 6 лет назад
best teacher ever
@vtvvnha2230
@vtvvnha2230 7 лет назад
love the way your explanation :)
@erica.simorangkir1116
@erica.simorangkir1116 7 лет назад
the best tutorial.
@prakashale1627
@prakashale1627 7 лет назад
You are the best one alex
@NickyKeyse
@NickyKeyse 6 лет назад
Excellent tutorial as ever Alex, really enjoyed seeing the end result, particularly when we put three posts in the database. Awesome. Just one thing, wtf happened to Post.php? I'm sure we had one before...
@bacharsaleh6984
@bacharsaleh6984 7 лет назад
the best series on the web ... please build an amzing Admin panel like AdminLTE.IO
@jayzdevera7579
@jayzdevera7579 6 лет назад
Hello there sir Curtis! I would like to ask if you can do a tutorial on ruby on rails because I shifted from Laravel to RoR development. No bias to PHP (Laravel) I just want to see some more tutorials in RoR. Both are great framework but wanted to learn RoR more. Thanks
@pankajvaghela6272
@pankajvaghela6272 5 лет назад
What about displaying that the slug is not unique, in case you try to enter custom slug? like in cases of username? Thanks for the tutorials btw
@DaeDev
@DaeDev 6 лет назад
Why are you setting the Middleware for The Post Controller in __construct(), the web file already has this, why not just do the same in the api file?
@zamzero1
@zamzero1 6 лет назад
Hey alex, just a quick question! U said in one of you videos that u can load js files that are located in Resources/assets/js depending on the view that u have (ex. Frontend - backend)! Can u explain to me how ? Cause i have two different layouts one for the frontend and one for the backend! Now i know what whatever js file i require in app.js gets compiled with webpack! How can i load js files only for the views i want?
@macphistoCL
@macphistoCL 4 года назад
I have a security question. If I check the source code in a web browser can I get (stole) the api_token and use it to get data using something like POSTMAN? How can I prevent this? Thanks
@fredrickboaz
@fredrickboaz 4 года назад
you can only get a token if you are logged in otherwise wrap your resource in auth:api middleware
@olatunjilawal1204
@olatunjilawal1204 6 лет назад
Hi Alex, I have a little problem with my api_token, it seems that i am getting the api_token but it still gives me an Unauthenticated error and i do not have a error in vue widget, what could possibly be the problem, Please help
@TariqSajid
@TariqSajid 6 лет назад
29:34 did he solve this problem he mention about the vue js methods
@Amirkhantv
@Amirkhantv 6 лет назад
api/works/unique not found please help
Далее
نترس تو برق نبود😅😅
00:17
Просмотров 930 тыс.
Top 7 Ways to 10x Your API Performance
6:05
Просмотров 334 тыс.
Why Signals Are Better Than React Hooks
16:30
Просмотров 479 тыс.
5 JavaScript Concepts You HAVE TO KNOW
9:38
Просмотров 1,4 млн
You don't need a frontend framework
15:45
Просмотров 128 тыс.
Why aren't you using Fastify? Or Koa? Or NestJS?
9:58