Laravel Routing Settings

Laravel Routing Overview of Routing Construction The construction methods are: Route::get,Route::post,Route::put,Route::patch,Route::delete,Route::options,Route::any,Route::match,Route::resource,Route::resources,Route::group Route::get('foo', function () { //Basic Mode }); Route::match(['get', 'post'], '/', function () { //Basic Mode ...

Added by cosmos33 on Sun, 14 Jul 2019 22:06:58 +0300

9. Registration and login, User Association

This section will implement the functions of registration and login; articles, comments and user association. Relational Definition First, modify the posts and comments table to add the user_id field /database/migrations/2017_04_12_124622_create_posts_table.php /database/migrations/2017_04_15_062905_create_comments_table.php public function up( ...

Added by chris270 on Tue, 09 Jul 2019 03:50:10 +0300

Let Bullets Fly~Improve PHP7 Performance with OPcache Extension| Laravel

No matter where I am, I will reply you immediately when I see the email.My Email: echo "YUBzYW1lZ28uY29tCg==" | base64 -d Preface It's 11:30 and the settling time is up. When PHP is running, there is a process that precompiles the PHP code, generates the byte code, then loads it into memory, and finally executes the compiled byte code fragme ...

Added by badviking on Sun, 07 Jul 2019 20:27:41 +0300

Talk about laravel query builder using subqueries

Summary: Complex SQL with subqueries is often used in projects, and Laravel's query constructor does not directly provide a method to convert it into subqueries, or even though it does, the examples given are not very specific and are not very friendly to beginners. This article mainly talks about how Laravel constru ...

Added by vipes on Sun, 19 May 2019 02:06:00 +0300

PHP & MySQL "Data Association One-to-One" Best Practice

Preface In the process of development, we usually encounter many one-to-one data processing situations. Most of the time we will get a list, and then a single record of the list corresponds to another table to achieve business. For example, the following two tables of commodity information and commodity details, here in order to demonstrate the ...

Added by Vizzini on Sat, 18 May 2019 01:31:07 +0300

Laravel Core Interpretation--ENV Loading and Reading

Laravel loads the. env file in the project at startup. It is often useful for applications to run in different environments with different configurations. For example, you might want to use the tested Mysql database locally and switch the project to the production Mysql database automatically when it comes online. This article will introduce th ...

Added by kdidymus on Fri, 17 May 2019 12:59:48 +0300