Laravel Directory Structure
app
The
appdirectory contains the core code of your application.
app/BroadcastingThe
Boardcastingdirectory contains all of the broadcast channel classes for your application. These classes are generated using themake:channelcommand. This directory does not exist by default, but will be created for you when you create your first channel.
app/ConsoleThe
Consoledirectory contains all of the custom Artisan commands for your application. These commands may be generated using themake:commandcommand.
app/EventsThis directory does not exist by default, but will be created for you by the
event:generateandmake:eventArtisan commands. TheEventsdirectory houses event classes.
app/ExceptionsThe
Exceptionsdirectory contains your application’s exception handler and is also a good place to place any exceptions thrown by your application.
app/HttpThe
Httpdirectory contains your controllers, middleware, and form requests.
app/JobsThis directory does not exist by default, but will be created for you if you execute the
make:jobArtisan command. TheJobsdirectory houses the queueable jobs for your applications.
app/ListenersThis directory does not exist by default, but will be created for you if you execute the
event:generateormake:listenerArtisan commands. TheListenersdirectory contains the classes that handle your events.
app/MailThis directory does not exist by default, but will be created for you if you execute the
make:mailArtisan command.
app/ModelsThe
Modelsdirectory contains all of your Eloquent model classes. The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database.
app/NotificationsThis directory does not exist by default, but will be created for you if you execute the
make:notificationArtisan command. It can be email, Slack, SMS, or stored in a database.
app/PolicesThis directory does not exist by default, but will be created for you if you execute the
make:policyArtisan command. ThePoliciesdirectory contains the authorization policy classes for your application.
app/ProvidersThe
Providersdirectory contains all of the service providers for your application.
app/RulesThis directory does not exist by default, but will be created for you if you execute the
make:ruleArtisan command. TheRulesdirectory contains the custom validation rule objects for your application.
bootstrap
The
bootstrapdirectory containsapp.phpfile which bootstraps framework.
The directory also houses acachedirectory which contains framework generated files.
config
The
configdirectory, as the name implies, contains all of your application’s configuration files.
database
The
databasedirectory contains your database migrations, model factories, and seeds.
public
The
publicdirectory contains theindex.phpfile, which is the entry point for all requests entering your application and configures autoloading. This direcotry also houses your assets such as images, JavaScript, and CSS.
resources
The
resourcesdirectory contains your views as well as your raw, un-compiled assets such as CSS or JavaScript. This directory also houses all of your language files.
routes
The
routesdirectory contains all of the route definitions for your applications. By default, several route files are included with Laravel:web.php,api.php,console.php, andchannels.php.
routes/web.phpThe
web.phpfile contains routes that theRouteServiceProviderplaces in thewebmiddleware group, 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 most likely be defined in theweb.phpfile.
routes/api.phpThe
api.phpfile contains routes that theRouteServiceProviderplaces in theapimiddleware group. These routes are intended to be stateless, so requests entering the application through these routes are intended to be authenticated via token and will not have access to session state.api.php파일은api미들웨어 그룹에 위치한RouteServiceProvider의 경로를 포함한다.
routes/console.phpThe
console.phpfile is all of your closure based console commands.
routes/channels.phpThe
channels.phpfile is where you may register all of the event broadcasting channels that your application supports.
storage
The
storagedirectory contains your logs, compiled Blade templates, file based sessions, file caches, and other files generated by the framework.
storage/appApplication generated files.
storage/frameworkFramework generated files and caches.
storage/logsApplication’s log files.
tests
The
testsdirectory contains your automated tests.
vendor
The
venderdirectory contains yourComposerdependencies.
CozyFex