Home » Php » php – laravel/laravel vs laravel/framework

php – laravel/laravel vs laravel/framework

Posted by: admin April 23, 2020 Leave a comment

Questions:

I am reviewing Laravel’s source code on github and noticed that there is a laravel/laravel and a laravel/framework.
They both link to the same documentation on Laravel’s website and state that it is a web application framework.

Why two repositories?

How to&Answers:

laravel/laravel is for the skeleton application you get when creating a new project. It provides a default structure that’s recommended (you’re not forced to use it). The repository contains default config files, controllers, routes, etc. As well as code responsible for bootstrapping the application.

It also includes a composer.json which defines the actual framework as dependency:

"require": {
    "laravel/framework": "5.0.*"
},

laravel/framework is the actual framework source.

As the readme.md on the framework repository says:

Note: This repository contains the core code of the Laravel framework. If you want to build an application using Laravel 5, visit the main Laravel repository.

Answer:

A comment that I received on the Laravel repository in relation to this question:

laravel/laravel is the part of the app that you work with yourself
(controllers, config, routes.php, resources, database, etc.) while
laravel/framework is the “core” of Laravel, stuff that you don’t
change.

Answer:

Laravel/Laravel is the application template/skeleton, and is the starting point for Laravel 4 apps.
Laravel/Framework is the kernal, which contains the actual framework components itself, and is downloaded by Composer into your application template/skeleton.