@rafaqat65 try from here..... https://laracasts.com/series/laravel-8-from-scratch
Documentation flaws
Laravel official documentation doesn't discuss many things in proper detail. For example nowhere its mentioned working of 'migrations' table or 'batch' column in db. Similarly other many things are not explained and devs need to watch videos from different sources.
I agree there are many gaps in the Laravel documentation, and many things it glosses over.
Posting about it here won’t make much of a difference, though. This is a user forum, not a direct channel to the people who write the documentation.
Look at the API.
@jlrdw , Sorry I didn't understand. Is there API documentation?
@jlrdw , Actually I noticed that if you watch laracasts its better and covers topics with practical detail but some people like me prefer reading over watching videos. https://laravel.com/docs/9.x covers topics but on many places details are missing and devs feel difficulty to understand until they watch some video. For example as I mentioned for migrations and batch number.
@jlrdw Thanks a lot!
Hi,
I find myself struggling to get detailed information from the documentation. Even after going through the API docs, it feels like I'm missing a crucial piece of information.
Could anyone explain how to properly understand the details of a method by providing an example?
My Approach
Example
I've been looking into Laravel's Router API for apiResource.
Checking the Official Docs
I also checked Laravel's documentation on API resource routes.
What's Clear
The parameters string $name, string $controller are clear to me, thanks to the examples provided in the docs.
What's Not Clear
I'm stumped on array $options = [].
My Dilemma
What do these options include? How can I find this information?
Digging into the Source Code
I've looked into the Router.php source code.
My takeaway is that this function uses the 'except' key in some way, but the options are being passed somewhere else.
Going Deeper
Then I also explored the PendingResourceRegistration.php source code.
Now, I have a bit more understanding of the options, but they are being passed even deeper into the code. This seems like a convoluted way to understand a simple function.
Can anyone guide me on what I might be missing? My question is not about what this function does, but how to effectively find out what it does.
Thank you!
@ItsReddi most of the options are also chainable methods, so you can think of the options array as another way to declare your chainable methods in one place. Ex you can do options: ['middleware' => 'auth:api'] or ->middleware('auth:api')
@krisi_gjika Thank you for your input on the $options parameter and its relation to chainable methods. However, my main question is more general. I'm looking for a more efficient way to understand the details of methods in Laravel, beyond diving deep into the source code. If you have any tips or official resources to make this process more efficient, I would greatly appreciate it.
Please or to participate in this conversation.