Should I List Websites On The Service Providers Root Directory Ou Under Public_html
Directory Construction
- Introduction
- The Root Directory
- The
app
Directory - The
bootstrap
Directory - The
config
Directory - The
database
Directory - The
lang
Directory - The
public
Directory - The
resource
Directory - The
routes
Directory - The
storage
Directory - The
tests
Directory - The
vendor
Directory
- The
- The App Directory
- The
Broadcasting
Directory - The
Panel
Directory - The
Events
Directory - The
Exceptions
Directory - The
Http
Directory - The
Jobs
Directory - The
Listeners
Directory - The
Mail
Directory - The
Models
Directory - The
Notifications
Directory - The
Policies
Directory - The
Providers
Directory - The
Rules
Directory
- The
Introduction
The default Laravel application structure is intended to provide a not bad starting point for both large and pocket-sized applications. But you lot are costless to organize your application however you like. Laravel imposes almost no restrictions on where any given class is located - every bit long as Composer tin autoload the class.
The Root Directory
The App Directory
The app
directory contains the core lawmaking of your application. Nosotros'll explore this directory in more particular shortly; even so, near all of the classes in your application volition be in this directory.
The Bootstrap Directory
The bootstrap
directory contains the app.php
file which bootstraps the framework. This directory also houses a enshroud
directory which contains framework generated files for performance optimization such as the road and services cache files. Yous should non typically need to modify whatever files within this directory.
The Config Directory
The config
directory, as the name implies, contains all of your application's configuration files. It'due south a great idea to read through all of these files and familiarize yourself with all of the options available to you.
The Database Directory
The database
directory contains your database migrations, model factories, and seeds. If you wish, y'all may also use this directory to agree an SQLite database.
The Lang Directory
The lang
directory houses all of your application's language files.
The Public Directory
The public
directory contains the index.php
file, which is the entry indicate for all requests entering your application and configures autoloading. This directory also houses your assets such every bit images, JavaScript, and CSS.
The Resource Directory
The resource
directory contains your views as well every bit your raw, un-compiled avails such every bit CSS or JavaScript.
The Routes Directory
The routes
directory contains all of the route definitions for your awarding. By default, several road files are included with Laravel: web.php
, api.php
, console.php
, and channels.php
.
The spider web.php
file contains routes that the RouteServiceProvider
places in the web
middleware group, which provides session state, CSRF protection, and cookie encryption. If your application does not offering a stateless, RESTful API then it is likely that all of your routes volition most likely exist defined in the spider web.php
file.
The api.php
file contains routes that the RouteServiceProvider
places in the api
middleware group. These routes are intended to be stateless, and then requests inbound the application through these routes are intended to exist authenticated via tokens and will not have access to session land.
The console.php
file is where you may define all of your closure based console commands. Each closure is leap to a control instance allowing a simple approach to interacting with each command's IO methods. Even though this file does non define HTTP routes, it defines console based entry points (routes) into your application.
The channels.php
file is where you lot may register all of the event dissemination channels that your application supports.
The Storage Directory
The storage
directory contains your logs, compiled Bract templates, file based sessions, file caches, and other files generated by the framework. This directory is segregated into app
, framework
, and logs
directories. The app
directory may be used to shop any files generated by your application. The framework
directory is used to store framework generated files and caches. Finally, the logs
directory contains your application'southward log files.
The storage/app/public
directory may be used to store user-generated files, such every bit profile avatars, that should exist publicly accessible. You lot should create a symbolic link at public/storage
which points to this directory. You may create the link using the php artisan storage:link
Artisan control.
The Tests Directory
The tests
directory contains your automatic tests. Example PHPUnit unit tests and feature tests are provided out of the box. Each test course should be suffixed with the discussion Test
. You may run your tests using the phpunit
or php vendor/bin/phpunit
commands. Or, if you would like a more detailed and cute representation of your test results, you may run your tests using the php artisan test
Artisan command.
The Vendor Directory
The vendor
directory contains your Composer dependencies.
The App Directory
The bulk of your application is housed in the app
directory. By default, this directory is namespaced under App
and is autoloaded by Composer using the PSR-four autoloading standard.
The app
directory contains a variety of additional directories such as Console
, Http
, and Providers
. Think of the Console
and Http
directories equally providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with your application, just do not actually incorporate awarding logic. In other words, they are two ways of issuing commands to your application. The Console
directory contains all of your Artisan commands, while the Http
directory contains your controllers, middleware, and requests.
A variety of other directories will be generated within the app
directory equally y'all employ the make
Artisan commands to generate classes. And then, for instance, the app/Jobs
directory volition not exist until you execute the make:job
Artisan command to generate a job grade.
{tip} Many of the classes in the
app
directory can be generated by Artisan via commands. To review the available commands, run thephp artisan listing make
command in your terminal.
The Broadcasting Directory
The Dissemination
directory contains all of the broadcast channel classes for your application. These classes are generated using the brand:aqueduct
command. This directory does not exist by default, but will exist created for you when y'all create your commencement aqueduct. To learn more than near channels, check out the documentation on effect broadcasting.
The Console Directory
The Console
directory contains all of the custom Artisan commands for your application. These commands may be generated using the brand:command
command. This directory also houses your console kernel, which is where your custom Artisan commands are registered and your scheduled tasks are defined.
The Events Directory
This directory does not exist by default, only will exist created for yous past the event:generate
and make:event
Artisan commands. The Events
directory houses event classes. Events may exist used to alert other parts of your application that a given action has occurred, providing a great deal of flexibility and decoupling.
The Exceptions Directory
The Exceptions
directory contains your awarding's exception handler and is also a good identify to place whatsoever exceptions thrown by your application. If you would like to customize how your exceptions are logged or rendered, yous should change the Handler
class in this directory.
The Http Directory
The Http
directory contains your controllers, middleware, and class requests. Most all of the logic to handle requests inbound your application volition be placed in this directory.
The Jobs Directory
This directory does not exist by default, only will exist created for you if you lot execute the brand:job
Artisan command. The Jobs
directory houses the queueable jobs for your application. Jobs may be queued past your application or run synchronously within the current request lifecycle. Jobs that run synchronously during the current request are sometimes referred to as "commands" since they are an implementation of the command pattern.
The Listeners Directory
This directory does not be past default, simply will exist created for y'all if you execute the event:generate
or make:listener
Artisan commands. The Listeners
directory contains the classes that handle your events. Outcome listeners receive an event example and perform logic in response to the result being fired. For example, a UserRegistered
issue might be handled past a SendWelcomeEmail
listener.
The Mail Directory
This directory does not exist by default, but will exist created for yous if yous execute the make:postal service
Artisan control. The Mail service
directory contains all of your classes that correspond emails sent past your application. Post objects allow you to encapsulate all of the logic of building an e-mail in a single, simple class that may exist sent using the Mail::send
method.
The Models Directory
The Models
directory contains all of your Eloquent model classes. The Eloquent ORM included with Laravel provides a beautiful, uncomplicated ActiveRecord implementation for working with your database. Each database tabular array has a corresponding "Model" which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the tabular array.
The Notifications Directory
This directory does non be by default, merely volition exist created for you if you lot execute the make:notification
Artisan command. The Notifications
directory contains all of the "transactional" notifications that are sent past your application, such as simple notifications about events that happen inside your awarding. Laravel's notification feature abstracts sending notifications over a variety of drivers such as e-mail, Slack, SMS, or stored in a database.
The Policies Directory
This directory does not be by default, but will be created for yous if you execute the make:policy
Artisan command. The Policies
directory contains the authorization policy classes for your application. Policies are used to determine if a user tin perform a given action against a resource.
The Providers Directory
The Providers
directory contains all of the service providers for your application. Service providers bootstrap your application by binding services in the service container, registering events, or performing whatsoever other tasks to prepare your application for incoming requests.
In a fresh Laravel awarding, this directory volition already contain several providers. Y'all are costless to add your own providers to this directory as needed.
The Rules Directory
This directory does non exist past default, but will exist created for you if you execute the make:dominion
Artisan command. The Rules
directory contains the custom validation rule objects for your awarding. Rules are used to encapsulate complicated validation logic in a unproblematic object. For more information, bank check out the validation documentation.
Should I List Websites On The Service Providers Root Directory Ou Under Public_html,
Source: https://laravel.com/docs/9.x/structure
Posted by: ramirezbispecephe60.blogspot.com
0 Response to "Should I List Websites On The Service Providers Root Directory Ou Under Public_html"
Post a Comment