laravel command, the basic use

Processing method when No application encryption key has been specified circumstances arise laravel

If there is no file in the root directory under .env

1, .env.example renamed using the copy command to modify .env

2, use the command php artisan key: generate obtain a password, is automatically saved to .env (This step can solve the basic problem, run the environment like)
3, copy the password to the config / app.php the key inside
4, re-run , OK.

.blade.php

  • Controller app \ Http \ Controllers

  • File name UserController

  • Call routing Route :: get ( 'usr / tom', 'UserController @ tom')

  • return view(‘user.profile’, [‘user’ => User::findOrFail($id)]);

  • Dependency Injection

    • inherit
    • Upload value method
    • receive
  • App.php open area found at config 'timezone' setting to the PRC to UTC

  • laravel inside a picture upload interface, and the soft links, access to pictures

    • PHP artisan storage:link
  • laravel windows, create a soft link in linux

  • Bootstrap4 table

  • icon

  • Once the configuration is cached, .env files will no longer be loaded, all calls to the env function will return null

    • php artisan config:cache
  • All maintenance mode request for the application is displayed as a custom view

    • resources/views/errors/503.blade.php
    • php artisan down --message=“Upgrading Database” --retry=60 --allow=127.0.0.1 --allow=192.168.0.0/16
    • php artisan up
  • php artisan storage:link

    • public/storage - storage/app/public
  • unit test

    • php vendor/bin/phpunit
  • To view the available commands

    • php artisan list make

Guess you like

Origin blog.csdn.net/qq_27084325/article/details/93543684