what is the folder that you need to contain the php files
Directory Structure
- Introduction
- The Root Directory
- The
app
Directory - The
bootstrap
Directory - The
config
Directory - The
database
Directory - The
lang
Directory - The
public
Directory - The
resources
Directory - The
routes
Directory - The
storage
Directory - The
tests
Directory - The
vendor
Directory
- The
- The App Directory
- The
Dissemination
Directory - The
Console
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 awarding structure is intended to provide a great starting point for both large and small applications. But y'all are free to organize your application nonetheless you similar. Laravel imposes almost no restrictions on where any given course is located - every bit long as Composer can autoload the class.
The Root Directory
The App Directory
The app
directory contains the cadre code of your application. We'll explore this directory in more detail soon; however, almost all of the classes in your application will be in this directory.
The Bootstrap Directory
The bootstrap
directory contains the app.php
file which bootstraps the framework. This directory as well houses a enshroud
directory which contains framework generated files for performance optimization such as the route and services cache files. You should not typically demand to modify any files inside this directory.
The Config Directory
The config
directory, as the name implies, contains all of your application'southward configuration files. Information technology's a smashing thought to read through all of these files and familiarize yourself with all of the options available to y'all.
The Database Directory
The database
directory contains your database migrations, model factories, and seeds. If you wish, y'all may too use this directory to hold an SQLite database.
The Lang Directory
The lang
directory houses all of your awarding's linguistic communication files.
The Public Directory
The public
directory contains the alphabetize.php
file, which is the entry point for all requests entering your application and configures autoloading. This directory also houses your avails such as images, JavaScript, and CSS.
The Resource Directory
The resources
directory contains your views as well as your raw, un-compiled assets such as CSS or JavaScript.
The Routes Directory
The routes
directory contains all of the route definitions for your application. By default, several route files are included with Laravel: web.php
, api.php
, console.php
, and channels.php
.
The web.php
file contains routes that the RouteServiceProvider
places in the spider web
middleware grouping, which provides session state, CSRF protection, and cookie encryption. If your application does not offer a stateless, RESTful API then it is likely that all of your routes will about likely exist divers in the 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, so requests entering the application through these routes are intended to be authenticated via tokens and will not accept access to session state.
The console.php
file is where you lot may define all of your closure based console commands. Each closure is bound to a control example allowing a simple arroyo to interacting with each control's IO methods. Fifty-fifty though this file does not ascertain HTTP routes, information technology defines console based entry points (routes) into your application.
The channels.php
file is where you may register all of the event broadcasting channels that your application supports.
The Storage Directory
The storage
directory contains your logs, compiled Blade templates, file based sessions, file caches, and other files generated past the framework. This directory is segregated into app
, framework
, and logs
directories. The app
directory may be used to store whatever files generated by your application. The framework
directory is used to store framework generated files and caches. Finally, the logs
directory contains your awarding's log files.
The storage/app/public
directory may be used to store user-generated files, such every bit profile avatars, that should be 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 automated tests. Instance PHPUnit unit tests and feature tests are provided out of the box. Each test class should be suffixed with the word Test
. Yous may run your tests using the phpunit
or php vendor/bin/phpunit
commands. Or, if yous would like a more detailed and beautiful 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 majority 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-4 autoloading standard.
The app
directory contains a variety of additional directories such every bit Panel
, Http
, and Providers
. Think of the Panel
and Http
directories as providing an API into the core of your application. The HTTP protocol and CLI are both mechanisms to interact with your awarding, but practise not really incorporate application logic. In other words, they are ii 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 inside the app
directory as you use the make
Artisan commands to generate classes. So, for example, the app/Jobs
directory will not exist until you execute the brand:job
Artisan command to generate a job class.
{tip} Many of the classes in the
app
directory can be generated past Artisan via commands. To review the available commands, run thephp artisan list brand
command in your terminal.
The Dissemination Directory
The Broadcasting
directory contains all of the broadcast channel classes for your application. These classes are generated using the make:aqueduct
command. This directory does not be by default, but will be created for y'all when you create your first channel. To acquire more about channels, cheque out the documentation on effect broadcasting.
The Console Directory
The Panel
directory contains all of the custom Artisan commands for your application. These commands may be generated using the make:command
command. This directory likewise houses your panel kernel, which is where your custom Artisan commands are registered and your scheduled tasks are defined.
The Events Directory
This directory does non exist past default, only will exist created for you lot by the effect:generate
and brand:event
Artisan commands. The Events
directory houses outcome classes. Events may be used to alarm other parts of your awarding that a given action has occurred, providing a great bargain of flexibility and decoupling.
The Exceptions Directory
The Exceptions
directory contains your application'southward exception handler and is also a good place to place any exceptions thrown by your application. If you would like to customize how your exceptions are logged or rendered, y'all should change the Handler
class in this directory.
The Http Directory
The Http
directory contains your controllers, middleware, and form requests. Nearly all of the logic to handle requests entering your application will be placed in this directory.
The Jobs Directory
This directory does not exist by default, but will be created for you lot if you execute the make:job
Artisan command. The Jobs
directory houses the queueable jobs for your awarding. Jobs may be queued by your awarding 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 control pattern.
The Listeners Directory
This directory does not exist by default, simply volition exist created for you lot if y'all execute the effect:generate
or make:listener
Artisan commands. The Listeners
directory contains the classes that handle your events. Event listeners receive an event instance and perform logic in response to the event being fired. For example, a UserRegistered
event might exist handled by a SendWelcomeEmail
listener.
The Mail Directory
This directory does non be by default, merely will be created for you if you execute the brand:mail service
Artisan command. The Mail
directory contains all of your classes that represent emails sent by your application. Mail objects allow y'all to encapsulate all of the logic of building an email in a single, uncomplicated grade that may be 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 cute, elementary ActiveRecord implementation for working with your database. Each database table has a corresponding "Model" which is used to collaborate with that table. Models allow you lot to query for data in your tables, as well as insert new records into the table.
The Notifications Directory
This directory does not exist by default, just will be created for yous if you execute the make:notification
Artisan command. The Notifications
directory contains all of the "transactional" notifications that are sent by your awarding, such as unproblematic notifications about events that happen within your application. Laravel's notification feature abstracts sending notifications over a variety of drivers such as email, Slack, SMS, or stored in a database.
The Policies Directory
This directory does not be by default, but will exist created for you if you execute the make:policy
Artisan control. The Policies
directory contains the authorization policy classes for your application. Policies are used to determine if a user can perform a given activeness confronting a resources.
The Providers Directory
The Providers
directory contains all of the service providers for your application. Service providers bootstrap your application past binding services in the service container, registering events, or performing any other tasks to prepare your application for incoming requests.
In a fresh Laravel application, this directory will already contain several providers. You lot are gratuitous to add your ain providers to this directory as needed.
The Rules Directory
This directory does not be by default, but will be created for you lot if you execute the make:dominion
Artisan command. The Rules
directory contains the custom validation rule objects for your application. Rules are used to encapsulate complicated validation logic in a simple object. For more information, check out the validation documentation.
Source: https://laravel.com/docs/9.x/structure
0 Response to "what is the folder that you need to contain the php files"
Postar um comentário