Laravel Flashcards
How do you create a laravel project?
laravel new dev.todoparrot.com
In the laravel project folder, what is the .env file for?
Managing settings to do with the project, such as database passwords etc.
What does the .gitattributes file do?
Used to maintain consistent settings across machines
What does .gitignore do?
Tells git which files to ignore from the repository
What is in the app directory?
Most of the custom code written for the project
What is the artisan command in the root directory?
A command line configuration tool
What is the bootstrap directory?
All the code required to initialise and start up the laravel application
What is in the config directory?
Mainly basic configuration files and things like database credentials, cache and email settings
What is gulpfile.js?
Used as part of elixir, it is used to automate compilation of css and js files.
What is package.json?
Used by elixir to install elixir and it’s various dependencies.
What is phpspec.yml?
Used to configure the behavior driven tool PHPSpec (I believe testing)
What is phpunit.xml?
PHPUnits configuration file for laravel.
What is the public directory?
The root directory of the application.
What is the other term for the index.php file in the public folder?
The frontcontroller.
What is in the resources folder?
Projects views and localised language files. You can also store your raw resources here such as coffee script etc.
What is the vendor folder for?
That is where the laravel and other related code is stored (via composer).
How do you start the built in laravel server?
php artisan serve
How do you set the namespace for your new laravel app?
php artisan app:name myprojectname
When setting a new namespace using the artisan command, what is updated?
All controllers / models any other relevant files as well as the composer.json file (psr-4 settings for autoloading)
The app.php file is in the config directory, what does it contain?
App wide settings including things like debug information.
The auth.php file is in the config directory, what does it contain?
Settings specific to authentication, including which model manages users, how password reminders are managed, database tables containing user information.
The broadcasting.php file is in the config directory, what does it contain?
Contains information pertaining to the way laravels new broadcast feature operates.
The cache.php file is in the config directory, what does it contain?
Contains configuration information for different caching modules.
The compile.php file is in the config directory, what does it contain?
Laravel can improve performance by generating a series of files that allow for faster package loading - this file allows you define which classes should be added and included in the final optimisation step.