Laravel Basic Knowledge Summary

Source: Internet
Author: User
Tags auth file upload php send mail require in python

Laravel knowledge is a simple study for a few days. I have a summary of the basic knowledge. Summary of the content from the Mu-class network of Libra vs Eternal Teacher's Laravel high-level commentary. There is a lot of knowledge without in-depth understanding. I hope I can use it frequently in my work life. Deepen understanding.

Laravel Video Commentary: Http://www.imooc.com/u/3781805/courses?sort=publish

1. Concept similar to Linux Yum automatic installation similar to the PIP auto-install in Python 2.composer is a php dependency management tool, not just a package manager we simply declare the dependent external tool library (libraries) in the project, Composer will automatically install these libraries and rely on library files 3.composer website http://getcomposer.org composer Chinese web http://phpcomposer.com 4. Use composer China full mirror Like view current mirror address composer Config-g Repo.packagist start this image service Http://www.phpcomposer.com/composer Chinese network system global configuration (push             Recommended for use, which has a tutorial, very simple) Single item configuration 5.composer use Search searches monolog see monolog presence Show show composer Composer Show--all monolog view Monolog version declaration relies on require composer require symfony/http-foundation automatic configuration, Download and process dependency issues install installation composer installed download the library updates we configured in the configuration file Update Update composer Update when we delete in the configuration file do not want to Configuration, execute this statement 6. Install Laravel (in fact Laravel itself is a package) 1. Install Laravel composer Create-project via composer Create-project command --prefer-dist Laravel/laravel laravel01 (the last word is a name, can be changed casually) 2. Install the Laravel installer first, install composer global require "Larav El/installer "Laravel NewLARAVEL02 laravel new test--dev can download the latest Laravel 7.artisan usage php artisan view current Laravel version as well as common commands php artisan List view common commands php artisan make:controller studentcontroller Create controller PHP artisan make:model Student Create model PHP a Rtisan make:middlewarw Activity Creates a user authentication function in middleware 8.laravel to generate auth required files PHP artisan make:auth Data Migration table that automatically generates a response table in the database P

        HP Artisan migrate migrating data php artisan make:migration create_students_table--create=students automatically generates a file Automatically create data migration when creating model PHP artisan Make:model article-m Data Fill creates a fill file and improves PHP Arti San Make:seeder studenttableseeder Execute a single fill file php artisan db:seed--class=studenttableseeder Batch Line fill file php artisan db:seed 9.laravel File upload provides a simple interface to operate local space, AmazonS3, Rackspace Cloud Storage can be very simple Switch between different save methods, but still use the same API action profile in config/filesystems.php 10.laravel Mail feature laravel mail feature based on popular Swiftmailer Library IQ, provides concise The API Laravel is SMTP MaIlgun mandtill amazonses php's Mail function SendMail provides a driver that allows us to quickly send mail configuration config/mail.php send Mail::raw () plain text format via local or cloud service Mail::send () sends an HTML-formatted 11.laravel cache method with put () Add () Forever () have () get () Pull () Forget () configured on the CONFIG/C ache.php 12.laravel error with log debug mode configuration config/app.php for local development, configure the APP_DEBUG environment variable to true.
    
    This must be false when on-line.
            HTTP exceptions some exceptions describe HTTP error codes from the server, such as 404 Page Not found, 401 authentication failed, or 500 program error log laravel log tool based on the powerful Monolog library, provides Single daily generates a log file based on the daily date syslog errorlog log mode and debug I NFO Notice warning errors critical and alert seven error levels 13. The Queue Laravel Queue Service provides a unified API for a variety of different background queues to allow for deferred execution of time-consuming tasks, such as sending mail, from and dramatically increase the request speed of the Web Step 1. Data table required for migrating queues 2. Writing task Classes 3. Push task to queue 4. Run Queue listener PHP artisan qu             Eue:listen 5. Handling failed tasks PHP artisan queue:failed-table create failed table PHP artisan migrate

          Migrating files  PHP Artisan queue:failed view failed queue php artisan queue:retry 1 Retry to execute job with queue ID 1 PHP Art Isan Queue:retry all re-tries to execute all queues PHP artisan queue:forget 1 Delete failed queue with ID 1 php artisan que
 Ue:flush Delete all failed queue profiles in config/queue.php


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.