Great course and even greater way of explaining how to do it. Man, it takes a great amount of skill to translate something a bit complicated in such a simple way. Great work!
I've come from Django, React and Vue, and hate with my soul php, BUT laravel seems quite entertaining and your video made it usable for a project of mine, thank you!
I'm done with the entire course, enjoyed every second of it and I'm gonna use it as reference in my upcoming projects. But Sir I have a request, could you please make a video on how to integrate Swagger docs into a laravel api? There are a couple of resources around, but most aren't helpful enough. Thank you.
I think Laravel creates that because of the relationship 'hasMany'. Laravel is smart enough (and abstracts lots of things) to understand customer class has many invoices so it says I should create function called hasInvoices. I am not sure but I think this is the case because it runs without problem
Great tutorial, it is really appreciated. What is your reasoning for CamelCase JSON rather than snake_casing? I see some people say it makes things easier for Java/C++/Python. Thoughts?
No it wont work because we put in rules array postalCode field name that will change into postal_code only after the $request->validated(), so you should leave it how it is with all()
$adminToken = $user->createToken("admin-token", ["create", "update", "delete"]); it return form me tha the createToken method is not define on the user
Instantiate variable $user like this: $user = User::where('email', $credentials['email'])->first(); It will return App\Models\User instance, which should have HasApiTokens trait.
Great course but i have a question for you: How would you handle filtering on the relationship? For example, having products with translations but i only want to get the products which have English translations.
Hi loved the tutorial just one question at 27:00 you said anyone using the API would expect camelcase , but i could stg every single third party API i used even from big companies like (google/facebook etc..) use the same naming conventions as SQL in their responses ( postal_code for example) , so which one is right lol
can someone explain to me i read the documentation however i still don't get the difference between with and loadMissing and when do i use them. Thanks
how about if we have 100 abilities or 100 role to apply to applicaton that we have build, so we must generate 100 token for those abbilities or role every sign in ? and how about make new abilities or role after applicaton running ? add the createtoken to the apps mannualy every time want to add new abilites or role ?
I have this issue please help: "message": "SQLSTATE[42S22]: Column not found: 1054 Unknown column 'postalCode' in 'field list' (SQL: insert into `customers`, I did everything but my prepareForValidation() is not working.
The api routes didn't work for me. You need to install the API package with the following command... php artisan install:api What's more you need to install on a clean project (i.e. immediately after project create).
Wonderfull tutorial. I hope this will help many developers. I have one question though. What if you want to save file within post request? I have tried this and got an error. I might doing something wrong when handling the request, but Laravel tools to save file doesn't working at all. If anybody did this I would appreciate if this will be hinted here in comments.
Target class [App\Http\Controllers\api\V1\App\Http\api\V1\Controllers\CustomerController] does not exist i am getting this problem although i checked everything 4 5 times nd its same as it shown in video
Great course. On the 'include related data' section: Wouldn't be easier to pass in the url something like "&with=invoices,roles,[etc]" in order to avoid writing params for each relation??
I might be late, but someone else might have this problem, in your App/Models/Customer.php for the public function, have the name of the function invoice instead of invoices, idk why but this works for me
More memory and less processes running on the same server. Since you are running it on your local computer, response times will always be laggy due to the graphical processes being ran (desktop, user applications, etc). On a dedicated server with lots of memory, the response times are faster.
1:32:18 "message": "Class \"App\\Http\\Request\\V1BulkStoreInvoiceRequest\" does not exist", "exception": "ReflectionException" i got this error message anyone can help?
Hi, Thanks alot for the video. Could you kindly guide me on using the built-in CORS functionality in Laravel 10? I'm experiencing difficulties in triggering the CORS validation. I've already set up a local virtual machine for the Laravel project and used Postman to simulate different origins by setting the "Origin" headers. Could you confirm if I've followed the correct process?
25:06 - unfortunately, adding a prefix to the routes just repeats (weirdly) the already 'app/http/controllers/v1/controllerName' after the given namespace; weird... so it results in something like Target class [NAMESPACE_GIVEN]\App\Http\Controllers\v1\[CONTROLLER_NAME] does does not exist. which is Target class App\Https\Controllers\v1\App\Http\Controllers\v1\[CONTROLLER_NAME] does not exist. NAMESPACE_GIVEN = App\Https\Controllers\v1
It was such a fantastic course to enjoy and learn. I had a lot of confusion about API development and even don't have such good ideas in case of API development. Thank you for this course.
What a nice tutotial - I like it. 44:43 While implementing filter transform, I didn't understand how "[gt]" and the likes were passed and where the $oprators arrays were gotten. Please, I need clearifcation.
As far as I know, Envato is talking about design. So, when I see this video, I'm little doubtful. But, surprisingly the explanation in this video is amazing and complete. For example, the versioning of API which is crucial in development but not discussed very often in another tutorial. Why you make a programming tutorial, Envato? Hahaha. Btw, thank you