好吧,所以我在另一个房间的服务器中的某个地方有一个git repo,我以前一直在使用SourceTree但是它对index.lock问题非常讨厌,显然这是大多数开发人员遇到的最常见问题SourceTree.虽然我发现如果我等待几分钟到半天它会自行解决,但我没有时间等待,我认为它完全违背了使用git客户端的目的.
但是,这不是关于SourceTree ...所以,我发现GitKraken,它看起来很酷,我从来没有index.lock的问题.唯一的问题是我无法推送到另一个房间的服务器.我配置了我的ssh密钥.我可以推/拉到github/bitbucket帐户,但不能下一个房间.如果您遇到过这样的问题,或者您对我如何解决问题有一点了解,请告诉我.我已经与支持团队取得了联系,但反应非常紧张.
我正在使用Laravel 5.
我想在注册成功后重定向用户.我在我的authcontroller中尝试了这些,但它不起作用.
protected $loginPath = '/plan';
protected $redirectTo = '/plan';
protected $redirectAfterRegister = 'plan/';
Run Code Online (Sandbox Code Playgroud)
这些工作成功登录,但注册后没有.
我也试图postRegister渲染一个视图,但使用postRegister方法会覆盖注册过程,我不想这样做.我只想将用户重定向到成功注册的页面.
我有一个booked带有start和end列的表作为日期戳;
我知道
$start = "2015-07-12 01:00:00";
$end = "2015-07-12 02:00:00";
$users = DB::table('booked')
->whereBetween('start', [$start, $end])->get();
Run Code Online (Sandbox Code Playgroud)
检查start列中是否包含$ start和$ end内的任何日期。
我想要的实际上是另一种方式。
在检查$ start和$ end日期变量在表中的start和end列中出现时遇到困难book。
我已经阅读了 Laravel 的文档和其他论坛,但它对我不起作用。我已经成功迁移了一个表,现在我想添加一个字段,将架构更改为“表”,但我得到的只是“没有什么可迁移”。
这是我所做的。
移民:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductTable extends Migration {
/**
* Run the migrations.
*
* @return void
*/
public function up()
{
Schema::create('product', function(Blueprint $table)
{
$table->text('image');
$table->integer('stock');
$table->integer('amount');
$table->string('color');
$table->string('dimension');
$table->integer('ordered');
$table->timestamps();
});
}
/**
* Reverse the migrations.
*
* @return void
*/
public function down()
{
Schema::drop('product');
}
}
Run Code Online (Sandbox Code Playgroud)
然后,运行命令php artisan migrate,一切正常。
然后我决定添加新字段,所以我将控制器更改为:
<?php
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;
class CreateProductTable extends Migration {
/**
* Run the migrations. …Run Code Online (Sandbox Code Playgroud) 我无法从 Swift 中的函数调用返回数组。
脚本现在有点长,也有点复杂,但这基本上是函数内部的输出:
func getRecentUpdates()
{
var updates = [("test", "hello"),("nice", "one")]
println(updates)
return updates
}
Run Code Online (Sandbox Code Playgroud)
println 在控制台中显示数组,但带有return,错误提示NSArray() is not convertible to ()
我正在尝试使用jQuery帖子但是我在使用twig语法的路径部分有问题.这是代码:
messageSender.click(function(e) {
e.preventDefault();
var threadId = $(this).find('a').data('id');
$.post("{{ path('messages_view', {id: "+threadId+"}) }}", function(data, status) {
console.log(data);
});
});
Run Code Online (Sandbox Code Playgroud)
这不会得到它的值threadId,而是将文字""+'threadId'+""存储到路径中的id变量.
我有一个关于 Lumen 7 的项目,其中包括很多队列,但我不能推迟工作。
这就是我派遣工作的方式:
dispatch(new NotifyJob($user, $template));
Run Code Online (Sandbox Code Playgroud)
但是当我添加这个时
dispatch(new NotifyJob($user, $template))->delay(now()->addMinutes(10));
Run Code Online (Sandbox Code Playgroud)
我收到这个错误
"Call to undefined method Laravel\\Lumen\\Bus\\PendingDispatch::delay()"
Run Code Online (Sandbox Code Playgroud)
这样做
EmailJob::dispatch($user, $template);
让我Undefined method dispatch
我就是无法推迟上班。