Each test class should be suffixed with the word Test. Example PHPUnit unit tests and feature tests are provided out of the box. The tests directory contains your automated tests. You may create the link using the php artisan storage:link Artisan command. You should create a symbolic link at public/storage which points to this directory. The storage/app/public directory may be used to store user-generated files, such as profile avatars, that should be publicly accessible. Finally, the logs directory contains your application's log files. The framework directory is used to store framework generated files and caches. The app directory may be used to store any files generated by your application. This directory is segregated into app, framework, and logs directories. The storage directory contains your logs, compiled Blade templates, file based sessions, file caches, and other files generated by the framework. The channels.php file is where you may register all of the event broadcasting channels that your application supports. Even though this file does not define HTTP routes, it defines console based entry points (routes) into your application. Each closure is bound to a command instance allowing a simple approach to interacting with each command's IO methods. The console.php file is where you may define all of your closure based console commands. 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 have access to session state. The api.php file contains routes that the RouteServiceProvider places in the api middleware group. If your application does not offer a stateless, RESTful API then all your routes will most likely be defined in the web.php file. The web.php file contains routes that the RouteServiceProvider places in the web middleware group, which provides session state, CSRF protection, and cookie encryption. By default, several route files are included with Laravel: web.php, api.php, console.php, and channels.php. The routes directory contains all of the route definitions for your application. The resources directory contains your views as well as your raw, un-compiled assets such as CSS or JavaScript. This directory also houses your assets such as images, JavaScript, and CSS. The public directory contains the index.php file, which is the entry point for all requests entering your application and configures autoloading. If you wish, you may also use this directory to hold an SQLite database. The database directory contains your database migrations, model factories, and seeds. It's a great idea to read through all of these files and familiarize yourself with all of the options available to you. The config directory, as the name implies, contains all of your application's configuration files. You should not typically need to modify any files within this directory. This directory also houses a cache directory which contains framework generated files for performance optimization such as the route and services cache files. The bootstrap directory contains the app.php file which bootstraps the framework. We'll explore this directory in more detail soon however, almost all of the classes in your application will be in this directory. The app directory contains the core code of your application. New to Laravel? Check out the Laravel Bootcamp for a hands-on tour of the framework while we walk you through building your first Laravel application. Laravel imposes almost no restrictions on where any given class is located - as long as Composer can autoload the class. But you are free to organize your application however you like. The default Laravel application structure is intended to provide a great starting point for both large and small applications.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |