"Laravel 5.1/5.8 Cheatsheet: https://www.php.cn/phpkj/laravel/cheatsheet58.html" Manual introduction: Laravel 5.8 continues to optimize on the basis of Laravel 5.7, including the introduction of new Eloquent relationships ( has-one-through), optimize email verification, automatic registration of authorization policy classes based on agreement, DynamoDB cache and Session driver, optimize time zone configuration of task scheduler, support assigning multiple authentication guards to broadcast channels, PSR-16 cache driver specification etc.
Laravel is a free and open source PHP Web framework created by Taylor Otwell. It is designed to implement the MVC architecture of Web software and serve as an alternative to CodeIgniter. Its source code is hosted on GitHub, and the license terms are MIT license.
The latest course: php Chinese website "Laravel Basics to Comprehensive Practical Online Live Class" is now open for registration!
Laravel features include: support for user authentication and permissions, a modular package system with a dedicated package library, ways to connect to many types of relational databases, and tools to assist applications Deployment and maintenance of programs, and the development of many syntactic sugars.
Laravel is considered one of the most popular PHP frameworks along with Symfony, Zend, CodeIgniter, Yii2 and other frameworks.
Tips: Before continuing to learn the laravel framework, you need to have a basic understanding of the PHP language.
Function
The following points are the core design concepts of Laravel
Bundles: The package management system provided by Laravel 3 allows Developers can easily extend some of the suite's functionality into their projects. Laravel 4 goes a step further by using Composer to manage dependencies between packages, making it possible to install PHP packages that are generally used in various frameworks or Laravel-specific from Packagist.
Eloquent ORM (Object Relational Mapping): Implements Active Record mode in PHP and provides some functions to create relationships between database objects. Following the principles of the Active Record pattern, Eloquent ORM uses categories to represent data tables, and binds object instances of these categories to a single piece of data in the data table.
Query builder: Released in Laravel 3, providing a more direct pipeline to access the Eloquent ORM. Rather than writing SQL query syntax, Laravel's query builder provides a series of classes and functions that can be used to run SQL queries using programmatic calls. At the same time, the running results of the query syntax can also be cached (which can be queried again).
Application logic: Integrate other developed functions in the project. The obvious cases are the use of Controller and the declaration of routes. Its syntax is similar to the Sinatra framework.
Reverse routing: Create routes one by one for the hyperlinks in the project. When the hyperlinks applied to the route are modified, all hyperlinks using the route will be automatically updated. . When using, you need to fill in the names of the routes you want to use, and Laravel will convert them into corresponding URIs.
Restful controllers: Provide a way to separate the logic behind HTTP GET and POST requests.
Class auto loading: It can automatically load PHP categories, eliminating the trouble of manually maintaining the reference paths of all categories. Categories will only be loaded when they are used, thus avoiding unnecessary loading of categories.
View composers: are customizable code blocks that will be run when the view is loaded.
Database seeding: Provides a pipeline to populate the database with default data to facilitate software testing, or as an initial application build step.
Unit testing has also been integrated into Laravel, which includes test cases that can detect and prevent regressions within the framework, and can use the Artisan CLI to run unit tests.
Homestead: A Vagrant virtual machine, preloaded with all the development tools needed by Laravel developers, including Ubuntu, Gulp, Bower and other tools to assist web development.
Tips: Our Laravel 5.8 tutorial will help you learn Laravel knowledge from beginner to advanced. If you have any questions, please go to the PHP Chinese website Laravel Community to ask your questions, and enthusiastic netizens will answer them for you.
Officially provided packages
The following modules can be installed through composer and packagist:
- ##Cashier was launched in Laravel 4.2 and can be connected in series Subscription-based payment services such as Stripe provide features such as coupons and receipts.
- SSH, introduced in Laravel 4.1, allows programs to run CLI commands on remote servers through SSH.
- Scheduler, launched in Laravel 5.0, can schedule Artisan instructions to run cronjob through the program, but it still needs to rely on the Cron daemon.
- Flysystem, launched in Laravel 5.0, unifies the file system functions to make the operation logic of local and cloud storage spaces (such as Amazon S3, Rackspace Cloud) consistent.
- Socialite, launched in Laravel 5.0, simplifies the process of connecting OAuth and provides platforms such as Facebook, Twitter, Google, GitHub and Bitbucket, etc. :13
If you do not use Homestead, you need to ensure that your server meets the following requirements. Here we take the long-term support version Laravel 5.5 as an example. If it is the latest version Laravel 5.8, you need PHP version >= 7.1.3:
PHP Version>= 7.0.0
OpenSSL PHP Extension
PDO PHP Extension
Mbstring PHP extension
Tokenizer PHP extension
XML PHP extension
Content covered by this Laravel5.8 tutorial manual
Laravel5.8 continues to be optimized on the basis of Laravel 5.7, including introducing new Eloquent relationships (has-one-through), optimizing email verification, based on Automatic registration of agreed authorization policy classes, DynamoDB cache and Session driver, optimized time zone configuration of task scheduler, support for assigning multiple authentication guards to broadcast channels, PSR-16 cache driver specification, etc.
Tips: Each chapter of this tutorial contains many Laravel examples. You can directly click the "Run Example" button to view the results online. These examples will help you better understand and use Laravel.
Latest chapter
- Telescope 应用调试工具 2019-08-14
- Socialite 社会化登录 2019-08-14
- Scout 全文搜索 2019-08-14
- Passport OAuth 认证 2019-08-14
- Horizon 队列管理工具 2019-08-14
- Envoy 部署工具 2019-08-14
- 浏览器测试 Dusk 2019-08-14
- Cashier 交易工具包 2019-08-14
Related courses
- The latest ThinkPHP 5.1 world premiere video tutorial (60 days to become a PHP expert online training course) 2022-02-17
- Let's briefly talk about starting a business in PHP 2023-01-04
- Large-scale practical Tianlongbabu development of Mini version MVC framework imitating the encyclopedia website of embarrassing things 2018-01-25
- Login verification and classic message board 2018-03-02
- Getting Started with PHP Practical Development: PHP Quick Creation [Small Business Forum] 2022-06-28
- Quick Start Node.JS Full Version 2022-09-30
- Write your own PHP MVC framework (40 chapters in depth/big details/must read for newbies to advance) 2022-12-08
- Horse soldier spring video tutorial 2022-04-12