Tag:laravel

  • Remember the pit of Laravel database migration function

    Time:2022-11-27

    surroundings:Laravel 8 need to useLaravelDatabase migration function, because I am a Virgo with obsessive-compulsive disorder, I like to name files by myself. For example: But when executing the migration, an error is reported: After several rounds of trying foundLaravelfor migration filesfile name formatIt has fixed parsing, so when I write the file name exactly according […]

  • Using laravel in Repository mode

    Time:2022-11-27

    laravel-repository Warehouse address Github Repository document address clear directory structure ModelsOnly responsible for defining the model(such as: model association, scope, get and set attribute, etc.) Repository is responsible for processing this tableAll related business logic, not only injecting the model, but any cache related to redis can be injected, and the code is located quickly […]

  • laravel mail alert, send mail

    Time:2022-11-26

    The first step is to modify the configuration file: MAIL_DRIVER=smtp MAIL_HOST=smtp.exmail.qq.com MAIL_PORT=465 MAIL_USERNAME=Mail address MAIL_PASSWORD=Mailbox authorization code MAIL_ENCRYPTION=ssl MAIL_FROM_ADDRESS=Mail address MAIL_FROM_NAME=Mailbox name (defined by yourself) The smtp driver of Tencent Enterprise Mailbox is used here, which can be changed according to the actual situation The second step is to generate the mail class. All mail […]

  • ERP Operations Documentation

    Time:2022-11-25

    project documentation 1. Basic introduction 1.0 Project Introduction The project is based on B/S structure, involving invoicing, financial modules, document printing and various reports. 1.1 Applicable scenarios Manufacturers of down and feather products. 1.2 Technical Exchange QQ group: 1129427935 Students who are interested in ERP can come in and discuss together, I will update the […]

  • laravel-soar – A package for easily optimizing sql statements in Laravel

    Time:2022-11-24

    laravel-soar– An extension package for easily optimizing sql statements in Laravel applications. Function Support statement optimization based on heuristic algorithm Support multi-column index optimization for complex queries (UPDATE, INSERT, DELETE, SELECT) Support EXPLAIN information-rich interpretation Supports SQL fingerprinting, compression and beautification Support for Eloquent query builder methods to generate SQL optimization reports Source link https://github.com/guanguans/laravel-soar […]

  • Laravel framework experience record

    Time:2022-11-23

    This article records that I am usingLaravelProblems and experiences encountered in the process: versionLaravel 8 Eloquent & Model Model attribute default value cannot be useddate()function: DB::selectHave it return an array instead of an object: (ref:https://www.cnblogs.com/hando…) <?php $Data = array_map(‘get_object_vars’, DB::select(” query “)); configuration directly inconfigYou can also create a new subdirectory in the directory byconfig(‘Directory. […]

  • How to use PHP Storm for elegant project development?

    Time:2022-11-22

    foreword Many phpers should have heard of PHP Storm as a development tool, and even many people use it as a production tool, but many people do not use it to the maximum extent. This article summarizes some tips for elegant development. development environment development tools Before reading this article, I think you should have […]

  • Learn the Laravel framework through several CTF questions

    Time:2022-11-22

    Laravel5.8.x deserializes POP chain Installation: where–prefer-distIndicates priority downloadzipCompression method composer create-project –prefer-dist laravel/laravel=5.8.* laravel5.8 in the routing fileroutes/web.phpadd in Route::get(‘/foo’, function () { if(isset($_GET[‘c’])){ $code = $_GET[‘c’]; unserialize($code); } else{ highlight_file(__FILE__); } return “Test laravel5.8 pop”; }); then inpublicdirectory from onephpThe service is ready for testing cd /public php -S 0.0.0.0:port /foo?c= chain one The […]

  • ThinkPHP5.1 Source Code Analysis (2) Automatic Loading Mechanism

    Time:2022-11-22

    Following the second article of the life cycle, everyone can rest assured that they will not casually write articles In the first article, we mentioned the entry script, and also said that the automatic loading function is registered in it This article assumes that you have the basics of autoloading and namespaces. If not please […]

  • laravel custom command to generate service, repository layer

    Time:2022-11-21

    Introduction When using laravel, I was shocked by the power of laravel. Artisan commands are often used in the development of laravel projects. How to use them is really smooth, especially when creating Controller or Model, it is really convenient, but in the company In , the problem often encountered is that the project will […]

  • laravel-exception-notify – laravel exception monitoring notification that supports multiple channels

    Time:2022-11-20

    laravel-exception-notify– Laravel exception monitoring notifications that support multiple channels (DingTalk group robots, Feishu group robots, Server sauce, corporate WeChat group robots, and Information). Function Monitor and send laravel application exceptions Support multiple channels (DingTalk group robots, Feishu group robots, Server sauce, enterprise WeChat group robots, Xingzhi) Customize the exception information data sent source code https://github.com/guanguans/laravel-exception-notify […]

  • Laravel Hprose RPC service

    Time:2022-11-20

    Open source address: https://github.com/flc1125/la… The project supports Laravel and non-Laravel projects, supportsphp >= 5.3version syntax Note:The following content, by default, you already have a certain understanding of Hprose. The content is based on the Laravel project introduction. Install Environment depends on C extensionshprose, see: Hprose official website, Hprose Pecl extension You can install it on […]