Tag:laravel

  • [tutorial] restful API using JWT authentication in laravel

    Time:2020-7-9

    This article is forwarded from the professional laravel developer community, original link: https://learnku.com/laravel/t… In this article, we’ll learn how to use JWT authentication to build restful APIs in larevel. JWT stands for JSON web tokens. We will also use the API to create full-featured crud applications for user products. When using cross platform applications, the […]

  • Use eloquent withcount() to count the number of corresponding relationships

    Time:2020-7-5

    This article is forwarded from the professional laravel developer community, original link: https://learnku.com/laravel/t… Eloquent has a little-known function calledwithCount(): it can help to get the number of records associated with objects including remote one to many relationships. Let’s look at an example. In our sample project, we have three models:User,PostAndComment。 All the relationships can be […]

  • Create a Vue single page application through laravel (1)

    Time:2020-6-16

    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t… Using laravel to create a Vue single page application (SPA) can build a neat API driven application. In this tutorial, we will learn how to build and run a spa application with Vue routing as the front end and laravel as the […]

  • How to customize command command in laravel

    Time:2020-6-15

    preface As anyone who has used laravel knows, laravel uses php articsan make:controller The controller can be generated, and the command can be used to generate intermediates and models in the same night. How to customize the generated files? Let’s have a look at the detailed introduction The customization method is as follows: 1. Create […]

  • Create zip compressed file in laravel and provide the implementation method of downloading

    Time:2020-4-27

    If you need your users to support multi file downloads, the best way is to create a compressed package and provide downloads. Next, I’ll show you the implementation in laravel through this article. In fact, this is not about laravel, but more about PHP. We are going to use the ziprarchive class that has existed […]

  • Runtime exception no application encryption key has been specified. Solution

    Time:2020-4-23

    The example of this paper describes the solution of runtime exception no application encryption key has been specified. To share with you for your reference, as follows: ① Place the. Env file in the project root .env APP_NAME=Laravel APP_ENV=local APP_KEY= APP_DEBUG=true APP_LOG_LEVEL=debug APP_URL=http://localhost DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=homestead DB_USERNAME=homestead DB_PASSWORD=secret BROADCAST_DRIVER=log CACHE_DRIVER=file SESSION_DRIVER=file SESSION_LIFETIME=120 QUEUE_DRIVER=sync REDIS_HOST=127.0.0.1 […]

  • Laravel access error prompt: ` warning: require (/ vendor / autoload. PHP): failed to open stream: no such file or di solution

    Time:2020-4-22

    The example of this article describes the error prompt of laravel framework access: ` warning require (vendorautoload. PHP) failed to open stream no such file or dire solution. To share with you for your reference, as follows: Error message: `Warning: require(/http/www.mywakavLee.cn/bootstrap/../vendor/autoload.php): failed to open stream: No such file or directory in /http/www.mywakavLee.cn/bootstrap/autoload.php on line 17 […]

  • Handling API certification with laravel passport

    Time:2020-4-21

    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t We will learn to use laravel’s passport API OAuth to create an authentication system. Step 1. Install laravel We need to create a latest laravel application with the following command, so please open the terminal to execute: laravel new auth Step 2. […]

  • Sharing tips for laravel routing optimization

    Time:2020-4-18

    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t When you are a beginner in laravel, laravel’s router provides you with a great and elegant API. What I’m going to introduce below is not any hidden or new knowledge. It’s just a small skill that may help you when you learn […]

  • Domain of laravel routing research: an example of solving the problem of multiple domain names

    Time:2020-4-12

    stores reserve A clean laravel There are two nginx configuration files. The main configuration is as follows: server_name *.amor_laravel_test_1.amor; root /var/www/amor_laravel_test/public; index index.php index.html index.htm; server_name *.amor_laravel_test.amor; root /var/www/amor_laravel_test/public; index index.php index.html index.htm; Split domain name into parameters Route::domain(‘{account}.{webname}.{suffix}’)->group(function () { Route::get(‘user/{id}’, function ($account, $webname, $suffix, $id) { //The split parameters can be received in […]

  • The method of field verification under laravel multi domain name

    Time:2020-4-9

    Preface A unified author background is being developed to allow authors to submit software to the site. We have developed the author background for one of the websites, now we plan to provide this background to other websites. It has the following characteristics: The domain names we visited are inconsistent. For the solution, see my […]

  • Laravel service container must know

    Time:2020-4-4

    The article was forwarded from the professional laravel developer community. Original link: https://learnku.com/laravel/t To learn how to build an application with laravel is not only to learn how to use different classes and components in the framework, but also to remember allartisanCommand or all helper functions (we have Google). Learning to code with laravel is […]