Setting up a new Laravel project - How to make a Laravel CRUD API Tutorial #1

  Рет қаралды 52,405

Quentin Watt Tutorials

Quentin Watt Tutorials

Күн бұрын

Пікірлер: 62
@sellmeawaffle
@sellmeawaffle 3 жыл бұрын
It's been mentioned but only in replies that if you are on a Windows machine you will need to modify your etc/hosts file to have both the domains accessible
@brucesterling2059
@brucesterling2059 3 жыл бұрын
dont know if anyone gives a shit but if you guys are stoned like me during the covid times then you can stream pretty much all of the new movies and series on Instaflixxer. Been binge watching with my gf for the last couple of days =)
@frederickshawn713
@frederickshawn713 3 жыл бұрын
@Bruce Sterling Yea, been using InstaFlixxer for since november myself =)
@nickmwaniki9701
@nickmwaniki9701 4 жыл бұрын
I must say this first episode has given the courage "to make that jump" to valet. Thanks for this awesome tutorial. Thank you!
@QuentinWatt
@QuentinWatt 4 жыл бұрын
You're very welcome!
@CalicoArchives
@CalicoArchives 2 жыл бұрын
Easy to understand. Thank you for making this.
@QuentinWatt
@QuentinWatt 2 жыл бұрын
Thank you very much
@syedsameerhasan
@syedsameerhasan 5 жыл бұрын
Thank you so much ..you are really awesome... I was trying to learn API creation.... And here you are doing Thanks again
@QuentinWatt
@QuentinWatt 5 жыл бұрын
It's a pleasure Sameer, I am glad these will be helpful :)
@matejl92
@matejl92 5 жыл бұрын
Calling env() in your code is a bad practice since env() function is slow. Consider api domain to your config file and call env() there since config gets cached and then use that config variable in your code. Also, thank you for awesome series, love watching them!
@QuentinWatt
@QuentinWatt 5 жыл бұрын
whatever works for you to speed up production or optimise security, sure. :) This was just 1 slightly better practice than hard coding the URL into the project. I never intended this to go to production. It's a simple learning project.
@faisalkhan6389
@faisalkhan6389 4 жыл бұрын
Awesome work.
@QuentinWatt
@QuentinWatt 4 жыл бұрын
Thank you so much 😀
@samirsamir7779
@samirsamir7779 5 жыл бұрын
hey Sir , you are delivering a great content and extremly well understood , are you expecting please to make a long detailled video for the most used tool like wordpress dev. ? ( php , css ..) to let us learn how to master the themes/plugins customization and creation please ? thank you x 1000 for your content.
@MarkSnape
@MarkSnape 5 жыл бұрын
Nice clear explanation. I think it would be better to use a config file for the API domain that can be cached rather than access the env function directly? It could also concat API prefix and APP_URL ?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
whatever works for you to speed up production or optimise security, sure. :) This was just 1 slightly better practice than hard coding the URL into the project.
@kennethpineda6143
@kennethpineda6143 5 жыл бұрын
Thank very much!! now I understand how to use API. Thank you!! Thank you!!
@Kuldeep100
@Kuldeep100 5 жыл бұрын
Thanks a lot Quentin. A very nice tutorial. Please include my request as well along with Leon's request. Vue SPA (with vuetify or Quasar) and Laravlel Passport. Kind regards.
@jeffcorpuz9481
@jeffcorpuz9481 4 жыл бұрын
when i try to make the route::domain('api.peoplefinder.test') on windows ( timestamp 7:07 ), my browser and postman cant reach this site. Is there a different way from windows os?
@QuentinWatt
@QuentinWatt 4 жыл бұрын
I am using Laravel Valet which automatically maps my domains. Since you are on a windows computer, you may need to add the sub domain to your hosts file in order to access it. I have a video on the topic here: kzbin.info/www/bejne/nKbMiGyqjNCtjrc Simply add api.peoplefinder.test along with any other URLs you have mapped.
@leonvanrijswijk8409
@leonvanrijswijk8409 5 жыл бұрын
It would be great if you will make a video adding Laravel Passport to this project, including password reset. And a Vue SPA as a front end.
@QuentinWatt
@QuentinWatt 5 жыл бұрын
I think I'll do something on passport soonish. :)
@jamols09
@jamols09 5 жыл бұрын
@@QuentinWatt Please do it especially with Laravel Passport since I still have no Idea how to use it.
@christostsangaris4785
@christostsangaris4785 5 жыл бұрын
Hi there Quentin! Great videos!! Just a question: Is there a benefit of using subdomain for api instead of /api/? From an SSL perspective, it is more expensive to protect a wildcard instead of a single URL. Thanks in advance.
@QuentinWatt
@QuentinWatt 5 жыл бұрын
It provides a little more structure. Hitting a subdomain like api.yourwebsite.com should guarentee you're always receiving a JSON response. As a subfolder it might be a bit weird that some parts of your website are returning a web response, and others are returning JSON. yourwebsite.com/api/ -> returns a JSON response yourwebsite.com/blog/ -> returns a web response
@QuentinWatt
@QuentinWatt 4 жыл бұрын
Oh.. by the way. You can get free SSL certificates with Lets Encrypts.
@othmaneboumediane7807
@othmaneboumediane7807 5 жыл бұрын
Man you're just awesome!
@QuentinWatt
@QuentinWatt 5 жыл бұрын
Thank you! 😬
@adante407
@adante407 5 жыл бұрын
Are you planning on doing any more Laravel? Would be great! 👍 Like a full Laravel beginners course?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
I do plan on doing a lot more laravel :)
@mel-182
@mel-182 5 жыл бұрын
Do you have a tutorial for auth API with token?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
Not yet. I will do it soon :)
@faisalkhan6389
@faisalkhan6389 4 жыл бұрын
Do you have any tutorial on Laravel subdomain application.
@QuentinWatt
@QuentinWatt 4 жыл бұрын
That was partly included in this series. Not sure how much detail you are looking for?
@faisalkhan6389
@faisalkhan6389 4 жыл бұрын
@@QuentinWatt My requirement is to make sub-domains in the laravel application like domain.application.com(app.faisal.com).
@Kuldeep100
@Kuldeep100 5 жыл бұрын
Domain issue: I had an error by entering Route::domain(value:'api.peoplefinder.test'). Then I removed value and tried with Route::domain('api.peoplefinder.test'). No errors.
@QuentinWatt
@QuentinWatt 5 жыл бұрын
the small white text 'value' is only there as a type hint from phpstorm (my editor). It's not part of the code, that's why it looks different.
@tamakunay9158
@tamakunay9158 5 жыл бұрын
Route::domain(env('API_DOMAIN')) -> that's what you need to write
@theknowledgeworldbyspecial9823
@theknowledgeworldbyspecial9823 4 жыл бұрын
@@tamakunay9158 api.peoplefinder.test's server IP address could not be found.
@razeevkumaryadav
@razeevkumaryadav 4 жыл бұрын
@@theknowledgeworldbyspecial9823 probably you need to have the laravel project in api.peoplefinder.test too by creating the symbolic link for that check google or other tutorial videos
@IamRinzin
@IamRinzin 5 жыл бұрын
Hi. Thanks for the work. This is a very useful tutorial. I am practicing this tutorial on my local ubuntu server. I was trying to fetch to API using the subdomain version you taught in the tutorial but its showing "this site can't be reached" issue whenever I try to get method. I think it has to something with creating a subdomain in my virtual server or maybe something else. Can you help me resolve the issues?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
It sounds like you don't have a local server set up. I'm not too sure how to do that on ubuntu but I use Laravel Valet on my mac for that. See my tutorials on how to set up Laravel. :)
@un7sh226
@un7sh226 5 жыл бұрын
hey in the starting code you wrote api.peoplefinder.test but it didnt work for me can you help?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
I'd need to know what your error was. The code is available for free, link in the description. Try set up the project and see where you went wrong.
@origaminandgeometry6248
@origaminandgeometry6248 5 жыл бұрын
Good job!
@guruzone2288
@guruzone2288 5 жыл бұрын
Which version of laravel we are working on ?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
The latest at the time of recording which was 5.8
@rw7799
@rw7799 5 жыл бұрын
what is this api for? external users who want to use your data or is this a crud system called an api? thx
@QuentinWatt
@QuentinWatt 5 жыл бұрын
yea it's a simple CRUD API. :) We use this exact set up with API resources on a rather large classifieds project. So this explains the basic concept, but this can be repeated for any data a front end app might need.
@knobay
@knobay 4 жыл бұрын
I've got through this now but there's a couple of changes in the latest versions of the tools that he's using. The syntax for the routes in laravel appears to be different now. Route::domain('api.peoplefinder.test') and Route::domain(env('API_DOMAIN')) worked for me. Postman as a Chrome extension is being retired, but is still available. And sequel pro doesn't support the default authentication with mysql, so you have to change the mysql authentication to legacy, instructions are on stack overflow - stackoverflow.com/questions/51179516/sequel-pro-and-mysql-connection-failed?rq=1
@QuentinWatt
@QuentinWatt 4 жыл бұрын
There are many different syntaxes for routes. Mine are not wrong. You have options. I am not using Postman as a chrome extension, I am using the postman app. Which is not being retired. Please don't leave comments like this unless you are absolutely sure because these can misinform other people watching my videos. Thank you.
@ravidahmed8866
@ravidahmed8866 3 жыл бұрын
hey i am doing html5 and you are helping me
@theknowledgeworldbyspecial9823
@theknowledgeworldbyspecial9823 4 жыл бұрын
api.peoplefinder.test’s server IP address could not be found.
@QuentinWatt
@QuentinWatt 4 жыл бұрын
You have to use Laravel Valet to set up the test server. That's done at 1:58 laravel.com/docs/6.x/valet
@anantmishra1498
@anantmishra1498 5 жыл бұрын
Laravel version ?
@QuentinWatt
@QuentinWatt 5 жыл бұрын
This was Laravel 5.8, so not too long ago.
@arash_samandar
@arash_samandar 5 жыл бұрын
if you have an error , this video doesn't teach everything, so I suggest Windows Users or Mac, First watch this video: kzbin.info/www/bejne/qGWTqnSQds5phrM , another note is that you must write your function in the Laravel Controller , otherwise it would give error as it did for me .
@QuentinWatt
@QuentinWatt 5 жыл бұрын
That is incorrect. You're welcome to download the code for free (link in the description) to find your errors. :) If you can paste the exact error into the comment section, I can help point you in the right direction.
@KastilIslam
@KastilIslam 2 жыл бұрын
But the storm kept on spreading, it even spread to countries such as Syria, Egypt, Libya, Sudan and many more. It spread so much destruction that I can't even explain in words. Millions were dying instantly. It was so horrible I wish it would never happen like this. I said to myself what exactly did Israel do to cause such a huge storm. What was in that building that Arab countries were angry about. And when will this horrible storm stop? 🌟please find more about these important dreams of Muhammad Qasim. We are the last generation of this ummah
@rinconfede
@rinconfede 4 жыл бұрын
Someone can make this "think" work on windows (preferably with laragon?, i try it with wamp too) Route::domain('api.peoplefinder.test') im stuck with this like almost one day and i cant make it work By the way, nice theoretical lesson (the practice part... i cant do it yet jaja) P/D: I know quentin is using a mac... but i cant affort that.... maybe if i sell my neightboor kidneys i could buy... naaa... too risky... jaja
@QuentinWatt
@QuentinWatt 4 жыл бұрын
:p There are many windows computers that cost the same as a mac. I am using Laravel valet which automatically registers and points my test domains, but normally on windows you have to set up this domain in the `/etc` file. This code creates a subdomain which you will also have to set up in the `/etc` file Route::domain('api.peoplefinder.test')
@rinconfede
@rinconfede 4 жыл бұрын
@@QuentinWatt I try to undestand my problem, could it be this 4 things 1) windows 2) my version of laravel (7.28.3) dealing with "domain" line 3) Laragon. (i believe is like valet, not linkin obviously) 4) the routing file (its below) you say i need to set up this DocumentRoot "C:/laragon/www/peopleFinder/public/" ServerName peopleFinder.test ServerAlias *.peopleFinder.test AllowOverride All Require all granted like this? i mean changing this two lines, right? ServerName api.peopleFinder.test ServerAlias *.api.peopleFinder.test Because it doesnt work
Seeding fake data with a factory - How to make a Laravel CRUD API Tutorial #2
11:41
From Laravel Blade to Vue.js + API [Live-coding Example]
22:28
Laravel Daily
Рет қаралды 169 М.
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 23 МЛН
Complete Api Authentication with Laravel Passport
14:57
WebDevMatics
Рет қаралды 83 М.
Making a create route - How to make a Laravel CRUD API Tutorial #3
13:02
Quentin Watt Tutorials
Рет қаралды 23 М.
Laravel CRUD in 50 minutes for Beginners  from Scratch
49:58
Devtamin
Рет қаралды 238 М.
Laravel: Create Public API with Cache and Rate Limits
12:18
Laravel Daily
Рет қаралды 46 М.
This is the Only Right Way to Write React clean-code - SOLID
18:23
Securing a Laravel API in 20 minutes with JWTs
20:36
Andrew Schmelyun
Рет қаралды 79 М.
Vim Tips I Wish I Knew Earlier
23:00
Sebastian Daschner
Рет қаралды 83 М.
Python FastAPI Tutorial: Build a REST API in 15 Minutes
15:16
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН