久久久久久久av_日韩在线中文_看一级毛片视频_日本精品二区_成人深夜福利视频_武道仙尊动漫在线观看

什么時候在 Laravel 中生成新的應用程序密鑰?

When to generate a new Application Key in Laravel?(什么時候在 Laravel 中生成新的應用程序密鑰?)
本文介紹了什么時候在 Laravel 中生成新的應用程序密鑰?的處理方法,對大家解決問題具有一定的參考價值,需要的朋友們下面隨著小編來一起學習吧!

問題描述

因為當我創建應用程序時它會自動在我的 .env 文件中為我設置它,所以我不確定我應該什么時候運行它.

Since it automatically sets it for me in my .env file when I create the app, I'm not sure when I should run it.

除此之外,如果第二個開發人員進來并克隆應用程序,他/她是否需要運行 php artisan key:generate ?

In addition to that, if a second developer comes in, and clones the app, does he/she need to run php artisan key:generate ?

我們怎么知道什么時候運行 php artisan key:generate ?

How do we know exactly when to run php artisan key:generate ?

推薦答案

php artisan key:generate 是一個在你的 中設置 APP_KEY 值的命令.env 文件.默認情況下,此命令在 composer create-project laravel/laravel 命令之后運行.如果你使用像 git 這樣的版本控制系統來管理你的項目進行開發,調用 git push ... 會將你的 Laravel 項目的副本推送到它要去的任何地方,但不會包含您的 .env 文件.因此,如果有人使用 git clone ... 克隆您的項目,他們將不得不手動輸入 php artisan key:generate 以使他們的應用程序正常運行.

php artisan key:generate is a command that sets the APP_KEY value in your .env file. By default, this command is run following a composer create-project laravel/laravel command. If you use a version control system like git to manage your project for development, calling git push ... will push a copy of your Laravel project to wherever it is going, but will not include your .env file. Therefore, if someone clones your project using git clone ... they will have to manually enter php artisan key:generate for their app to function correctly.

因此,TL:DR 唯一一次您需要調用php artisan key:generate 是跟隨一個預先創建的cloneLaravel 項目.

So, TL:DR the only time you need to call php artisan key:generate is following a clone of a pre-created Laravel project.

旁注:如果您嘗試在 APP_KEY 設置為 SomeRandomString(這是您的 .env.example 中的默認值)的情況下運行 Laravel 項目code> 文件,你實際上會得到一個錯誤:

Side note: If you try to run a Laravel project with your APP_KEY set to SomeRandomString (which is the default in your .env.example file, you will actually get an error:

未找到受支持的加密器.密碼和/或密鑰長度無效.

No supported encrypter found. The cipher and / or key length are invalid.

這篇關于什么時候在 Laravel 中生成新的應用程序密鑰?的文章就介紹到這了,希望我們推薦的答案對大家有所幫助,也希望大家多多支持html5模板網!

【網站聲明】本站部分內容來源于互聯網,旨在幫助大家更快的解決問題,如果有圖片或者內容侵犯了您的權益,請聯系我們刪除處理,感謝您的支持!

相關文檔推薦

Laravel Eloquent Union query(Laravel Eloquent Union 查詢)
Overwrite laravel 5 helper function(覆蓋 Laravel 5 輔助函數)
laravel querybuilder how to use like in wherein function(laravel querybuilder 如何在 where 函數中使用 like)
The Response content must be a string or object implementing __toString(), quot;booleanquot; given after move to psql(響應內容必須是實現 __toString()、“boolean和“boolean的字符串或對象.移動到 psql 后給出) - IT屋-程
Roles with laravel 5, how to allow only admin access to some root(Laravel 5 的角色,如何只允許管理員訪問某些根)
Laravel Auth - use md5 instead of the integrated Hash::make()(Laravel Auth - 使用 md5 而不是集成的 Hash::make())
主站蜘蛛池模板: 一级在线视频 | 欧美一区二区在线观看 | 成人日韩精品 | 久久久欧洲| 亚洲一区av在线 | 成人在线视频观看 | 日韩欧美精品在线播放 | 国产精品视频一二三 | 狠狠操天天操 | av网站推荐| 国产成人麻豆免费观看 | 特级生活片| 九九亚洲 | 亚洲自拍偷拍欧美 | 黄色在线播放视频 | 久久成人综合 | 青青久视频 | 九九热免费看 | 国产精品九九 | 日韩一二三 | 81精品国产乱码久久久久久 | 草久久免费视频 | 99色视频| av毛片| 秋霞电影院午夜伦 | 久久一区二区三区四区五区 | 久久免费精品视频 | 成人午夜视频在线观看 | 中文字幕日韩一区 | 久久99精品国产麻豆婷婷 | 成人av播放| 欧美成人性生活 | 国产精品免费看 | 日韩av高清在线 | 99精品网 | 97人人草| 91成人免费看 | 成人高潮片免费视频欧美 | 久久久激情视频 | 日韩精品免费播放 | 国产精品视频999 |