我正在尝试PHP微框架流明(来自Laravel).
我的第一步是查看.env.example文件并复制它以获取我的.env文件.有一个变量APP_KEY就像在Laravel中一样.现在我尝试了简单的命令php artisan key:generate来获取我的新密钥但是我遇到了以下错误消息
php -r "echo md5(uniqid()).\"\n\";"
有人知道我如何为流明生成密钥吗?
用解决方案更新
所以我找到了我最喜欢的解决方案.在命令行(Linux)上我运行的7142720170cef01171fd4af26ef17c93东西给了我这样的东西.bashrc.
如果您要更频繁地使用流明,您可能需要/home/USERNAME在您的主目录中创建一个别名nano ~/.bashrc.为此,您可以使用vi ~/.bashrc或打开文件,alias phpkey='php -r "echo md5(uniqid()).\"\n\";"'并在文件末尾复制以下别名phpkey.现在你可以使用命令.env.example,它会给你一个32个字符长的随机字符串:)
我的Windows 8.1崩溃了.现在我的dist上有一些文件被破坏了.这包括我的流浪汉机器索引(如果命名正确但不知道它是这个文件 - > C:\ Users\USERNAME.vagrant.d/data/machine-index/index).
所以那里有很多二进制或十六进制的东西(再次不是shure因为我不会处理这些东西,所以如果我错了就纠正我!)如果我尝试启动所有内容后,Vagrant会发出以下消息开机.
vagrant up 返回此
The machine index which stores all required information about
running Vagrant environments has become corrupt. This is usually
caused by external tampering of the Vagrant data folder.
Vagrant cannot manage any Vagrant environments if the index is
corrupt. Please attempt to manually correct it. If you are unable
to manually correct it, then remove the data file at the path below.
This will leave all existing Vagrant environments "orphaned" and …Run Code Online (Sandbox Code Playgroud) 今天开始工作,Ubuntu上的Chromium突然抛出
NET::ERR_CERTIFICATE_TRANSPARENCY_REQUIRED on a well known host.
Run Code Online (Sandbox Code Playgroud)
已经尝试删除.pki/nssdb/*,但没有任何改变.
我尝试在页面中包含Facebook评论,但我总是收到以下错误.
Uncaught TypeError: Cannot read property 'handleServerJS' of undefined
Run Code Online (Sandbox Code Playgroud)
在这里我的代码.
在开始<body/>标记之后我包括这个.
<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/de_DE/sdk.js#xfbml=1&appId=XXXXX&version=v2.0";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
Run Code Online (Sandbox Code Playgroud)
在页面的某处,我包含了评论框.
<div class="fb-comments" data-href="<?php echo get_permalink() ?>" data-numposts="5" data-colorscheme="light"></div>
Run Code Online (Sandbox Code Playgroud)
编辑:我不知道是什么导致这个,但它似乎工作.
我有自定义请求,它扩展了Backpack CrudController.
现在我想覆盖ValidatesWhenResolvedTrait的prepareForValidation,因为它看起来像是修改我的传入数据的正确位置,但我无法弄清楚如何...
所以我的第一个问题是,我可以覆盖这种方法吗?受保护......
protected function prepareForValidation()
Run Code Online (Sandbox Code Playgroud)
我的第二个问题,如何修改Request或FormRreuqest对象的输入?
这是我的RequestClass
<?php
namespace App\Http\Requests;
use App\Http\Requests\Request;
use Config;
class DonationsRequest extends \Backpack\CRUD\app\Http\Requests\CrudRequest
{
/**
* Determine if the user is authorized to make this request.
*
* @return bool
*/
public function authorize()
{
// only allow updates if the user is logged in
return \Auth::check();
}
/**
* Get the validation rules that apply to the request.
*
* @return array
*/
public function rules()
{
return [
'name' => …Run Code Online (Sandbox Code Playgroud) 我不明白为什么我的 Repo 的 GitLab CI Pipelines 无法运行。我有一个.gitlab-ci.yml文件并启用了该功能,但管道无法运行。另外,如果我尝试手动触发管道,我会收到以下错误。
Pipeline cannot be run.
Pipeline will not run for the selected trigger. The rules configuration prevented any jobs from being added to the pipeline.
Run Code Online (Sandbox Code Playgroud)
CI 功能已启用。
这是我的.gitlab-ci.yml文件。
Pipeline cannot be run.
Pipeline will not run for the selected trigger. The rules configuration prevented any jobs from being added to the pipeline.
Run Code Online (Sandbox Code Playgroud)
谢谢你!
我想知道在用ajax更改内容后是否有可能重新初始化基础.
在我的情况下,我试图在从ajax调用传回的表单上重新初始化基础表单验证.
我试着调用
$(document).foundation()
哪个应该重新启动所有的javascript ...
我只是使用 Composer 为项目安装一些依赖项。在这个项目中,我们使用 cartalyst/sentry-social 包。为了得到这个,我必须使用一个特殊的 GitHub 帐户 - 但我不知道我使用的命令大约是一个小时:/
所以现在我输入了错误的 GitHub 登录凭据,不知怎的,它被保存了,但我不知道如何重置它们,所以 Composer/git 会再次询问我登录凭据。
那么如何重置此登录凭据呢?
我正在开发一个Joomla 3.0组件.作为示例,我从Joomla文档中下载了com_hello组件.
我发生的错误是,当我检查视图列表中的复选框时,我收到一条错误消息TypeError: b is null.这个错误发生在core.js的某个地方.
通常在2.5,如果我使用JHtml::_('grid.id',$i,$item->id);代码并<input type="hidden" name="boxchecked" value="0" />在我的表单中有字段它工作正常.
我还查看了Joomla核心的一些组件,但我没有找到丢失的东西或其他一些错误.
这是default.php我的观点的代码:
<?php
// NO DIRECT ACCESS TO THIS FILE
defined('_JEXEC') or die('Restricted access');
JHtml::_('behavior.tooltip');
?>
<form action="<?php echo JRoute::_('index.php?option=com_simplesuite'); ?>" method="post" name="adminForm">
<table class="adminlist">
<thead>
<tr>
<th>ID</th>
<th><input type="checkbox" name="checkall-toggle" title="<?php echo JText::_('JGLOBAL_CHECK_ALL'); ?>" value="" onclick="Joomla.checkAll(this);" /></th>
<th><?php echo JText::_('COM_SIMPLESUITE_TAGCLOUD_ADMINISTRATOR_LIST_NAME'); ?></th>
<th><?php echo JText::_('COM_SIMPLESUITE_TAGCLOUD_ADMINISTRATOR_LIST_TAGS'); ?></th>
<th><?php echo JText::_('COM_SIMPLESUITE_TAGCLOUD_ADMINISTRATOR_LIST_ACTIONS'); ?></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->items as $i => $item) : …Run Code Online (Sandbox Code Playgroud) php ×3
javascript ×2
ajax ×1
chromium ×1
composer-php ×1
facebook ×1
git ×1
github ×1
gitlab ×1
gitlab-ci ×1
joomla ×1
joomla3.0 ×1
jquery ×1
laravel ×1
laravel-5.4 ×1
lumen ×1
ssl ×1
ubuntu ×1
vagrant ×1
validation ×1
windows-8.1 ×1