Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where is Illuminate?

Tags:

php

laravel

Every time when I try to do some modifications in certain area, Authentication for example, I end up finding everything is declared in Illuminate\Foundation\....

Okay, now all I need to do is get to that location and look into some codes.

But hey, where is this Illuminate and all stuff???

I don't see any folders named Illuminate anywhere in my Laravel package.

Tried to search for the solution but I guess I'm the only silly person who lacks ability in understanding some basics.

like image 489
sCha Avatar asked Jul 12 '16 02:07

sCha


People also ask

Where can I find illuminate Laravel?

Illuminate is located in /vendor/laravel/framework/src/Illuminate .

What is illuminate in Laravel?

Illuminate is the namespace Laravel choose to put their code in. The word Illuminate means to light-up something. By using Laravel you are illuminating PHP development experience in their terms, hence the name. That's it; just a namespace.


2 Answers

Just to officially answer this question.

The files OP was looking for, along with any other Laravel or package files, are stored in the vendor folder - which you can access from the root Laravel directory.

As @Gavin points out in the comments:

Illuminate is located in /vendor/laravel/framework/src/Illuminate

like image 108
James Avatar answered Oct 31 '22 01:10

James


Laravel take the advantage of the autoload features in Composer.

One quick and simple tips:

You can actually find this in composer.lock file. Then find the PSR autoload. For instance, for Laravel/framework:

       {
        "name" : "laravel/framework",
        .......
        .......
        "autoload": {
            "classmap": [
                "src/Illuminate/Queue/IlluminateQueueClosure.php"
            ],
            "files": [
                "src/Illuminate/Foundation/helpers.php",
                "src/Illuminate/Support/helpers.php"
            ],
            "psr-4": {
                "Illuminate\\": "src/Illuminate/"
            }
        }
       }

Since there are a lot of packages in vendor folder, refer the name of the package in the composer.lock. For example, Illuminate is under laravel/framework packages. Then, look for vendor/laravel/framework

Then you know, Illuminate is mapped to vendor/laravel/framework/src/Illuminate

like image 39
geckob Avatar answered Oct 31 '22 02:10

geckob