[
13
]
Browsing the API (
http://laravel.com/api
) can be somewhat intimidating at first.
But it is often the best way to understand how a particular method works under the
hood. Here are a few tips:
• The
Illuminate
namespace does not refer to a third-party library. It is the
namespace that the author of Laravel has chosen for the different modules
that constitute Laravel. Every single one of them is meant to be reusable and
used independently of the framework.
• When searching for a class definition, for example,
Auth
, in the source code
or the API, you might bump into
Facade
, which hardly contains any helpful
methods and only acts as a proxy to the real class. This is because almost
every dependency in Laravel is injected into the service container when it
is instantiated.
• Most of the libraries that are included in the
vendor/
directory contain
a
README
file, which details the functionality present in the library (for
example,
vendor/nesbot/carbon/readme.md
).
Do'stlaringiz bilan baham: |