Laravel Classroom image

Yasar  Khan / Professional / Web Technology

 
To post your Question Join Classroom
 
Lesson Topics's No:-  First|1 | 2 | 3 | 4|Last
Lessons:-Project Structure

2.2 Application Directory Structure
As mentioned above, /application is where all the fun happens, so let’s have a look at the
structure of the /application directory.
1 /config
2 /controllers
3 /language
4 /libraries
5 /migrations
6 /models
7 /tasks
8 /tests
9 /views
10 /bundles.php [file]
11 /routes.php [file]
12 /start.php [file]

And now a closer look at each one.
/config
The config directory contains a number of configuration files for changing various aspects of the
framework. No configuration needs to be set at install for the framework to work ‘out of the box’.
Most of the configuration files return key-value PHP arrays of options, sometimes key-closure
pairs that allow a great deal of freedom to modify the inner working of some of Laravel’s core
classes.
/controllers
Laravel provides two methods for routing, using controllers and using routes to closures. This
directory contains the Controller classes that are used to provide basic logic, interact with data
models, and load view files for your application. Controllers were added to the framework at
a later date to provide familiar ground for users migrating from other frameworks. Although
they were added as an afterthought, due to Laravel’s powerful routing system, they allow you
to perform any action which can be performed using routes to closures.
/language
In this directory, PHP files containing arrays of strings exist to enable easy localization of
applications built using Laravel. By default the directory contains string files for pagination
and form validation in the English language.
/libraries
The libraries directory can be used to ‘drop in’ single class PHP Libraries to provide extra
functionality for your application. For larger Libraries it is recommended that you create a
Bundle instead. The libraries directory is added to the Autoloader at startup from the start.php
file.
/migrations
The migrations directory contains PHP classes which allow Laravel to update the Schema of
your current database, or populate it with values while keeping all versions of the application
in sync. Migration files must not be created manually, as their file name contains a timestamp.
Instead use the Artisan CLI interface command php artisan migrate:make <migration_name>
to create a new Migration.
/models
Models are classes that represent your project’s data. Normally this would mean integrating
with a form of database, or other data source. Laravel provides three methods for interacting
with common database platforms, including a query builder named ‘Fluent’⁴, which allows you
to create SQL queries by chaining PHP methods. You could also use the Eloquent ORM to
represent your tables as PHP Objects, or use the plain old raw SQL queries that you’re used to.
Fluent and Eloquent both use a similar syntax, making their adoption a smooth transition.
Files in the models directory are auto-loaded automatically from start.php.
/tasks

 
 
 

Yasar  Khan

Skills    Laravel

Qualifications :-
Location :-Dehradun,Dehradun,Uttarakhand,India
Description:- Hi i am yasar working as web developer since last 3 years.
Explore
 

  Students (0)