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

什么時候在 Laravel 中生成新的應(yīng)用程序密鑰?

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

問題描述

因為當(dāng)我創(chuàng)建應(yīng)用程序時它會自動在我的 .env 文件中為我設(shè)置它,所以我不確定我應(yīng)該什么時候運行它.

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.

除此之外,如果第二個開發(fā)人員進來并克隆應(yīng)用程序,他/她是否需要運行 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 是一個在你的 中設(shè)置 APP_KEY 值的命令.env 文件.默認(rèn)情況下,此命令在 composer create-project laravel/laravel 命令之后運行.如果你使用像 git 這樣的版本控制系統(tǒng)來管理你的項目進行開發(fā),調(diào)用 git push ... 會將你的 Laravel 項目的副本推送到它要去的任何地方,但不會包含您的 .env 文件.因此,如果有人使用 git clone ... 克隆您的項目,他們將不得不手動輸入 php artisan key:generate 以使他們的應(yīng)用程序正常運行.

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 唯一一次您需要調(diào)用php artisan key:generate 是跟隨一個預(yù)先創(chuàng)建的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 設(shè)置為 SomeRandomString(這是您的 .env.example 中的默認(rèn)值)的情況下運行 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.

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

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

相關(guān)文檔推薦

Laravel Eloquent Union query(Laravel Eloquent Union 查詢)
Overwrite laravel 5 helper function(覆蓋 Laravel 5 輔助函數(shù))
laravel querybuilder how to use like in wherein function(laravel querybuilder 如何在 where 函數(shù)中使用 like)
The Response content must be a string or object implementing __toString(), quot;booleanquot; given after move to psql(響應(yīng)內(nèi)容必須是實現(xiàn) __toString()、“boolean和“boolean的字符串或?qū)ο?移動到 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())
主站蜘蛛池模板: 国产色99精品9i | 麻豆精品国产91久久久久久 | 天堂一区在线 | 久久久久无码国产精品一区 | 久久久久久高清 | 欧美亚洲网站 | 黑人巨大精品欧美黑白配亚洲 | 欧美一区二区二区 | 久久久久久久久综合 | 草草视频在线播放 | 亚洲精品一区在线 | 青青操av | 欧洲一区视频 | 亚洲精品高清视频 | 国产精品久久久亚洲 | 欧美一级二级视频 | 青青草原综合久久大伊人精品 | heyzo在线| 7777在线 | 夜夜操天天干 | 欧美国产日韩在线 | 欧美久久精品一级黑人c片 91免费在线视频 | 香蕉一区二区 | 国产伦精品一区二区三区在线 | 国产视频中文字幕在线观看 | 操夜夜 | 91精品久久久久久综合五月天 | 成人在线激情 | 每日在线更新av | 日韩一级| 亚洲精品视频一区 | 久久久久久久国产 | 久久久精品一区 | 久久一及片 | 自拍 亚洲 欧美 老师 丝袜 | 久久91精品国产一区二区 | 天天亚洲 | 国产真实精品久久二三区 | avmans最新导航地址 | 亚洲欧美激情精品一区二区 | 一级美国黄色片 |