Laravel 4.2 directory structure

When you first learn about laravel you need to understand the directory structure of laravel, this article i will explain little bit about directory structure in laravel 4.2, this tutorial is for beginners learning about laravel 4.2.

The app/commands is for storing your own php artisan command, you can create your own artisan command and placed under this folder. For more info on how to create your own artisan command, read my other article here.

In laravel 4.2 all configuration files lives under app/config folder, you can see the database.php for database configuration, mail.php for email and so on.

In laravel 4.2, you can create a controller class and put it under app/controllers/, you can also create another folder inside app/controllers/ and put the controller class in there.

The app/database is where your database migration and seeder lives, every time you create migration it will be stored inside app/database folder.

The app/lang/ is where you define the language translation if you want to create multi language application, the default there is only one language which is 'en' for english, but you can create another language such as 'ru' for russia or 'jp' for japan and so on.

The app/models is where you put your model in laravel 4.2, every tables should have it's own model, so you can use it with eloquent.

This folder is not important specially if you are beginner, no need to worry about this folder.

The app/storage is where the application cache, logs, and session stored, the laravel.log also lives under this folder, app/storage/logs/laravel.log to be exact.

The app/tests is where you put your unit test file (phpunit).

The app/views is where you put your laravel view, whether it's a blade or php template, all views in laravel 4.2 lives under app/views.

The app/routes.php is your laravel 4.2 routing file, put every route on this file.

The public folder is where you put your static files, such as image, css, javascript, etc, you can summon these files on your views.