本文整理汇总了PHP中Carbon::tomorrow方法的典型用法代码示例。如果您正苦于以下问题:PHP Carbon::tomorrow方法的具体用法?PHP Carbon::tomorrow怎么用?PHP Carbon::tomorrow使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Carbon
的用法示例。
在下文中一共展示了Carbon::tomorrow方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: testGetIncompleteProductLoadsWhenIdHasProduct
public function testGetIncompleteProductLoadsWhenIdHasProduct()
{
$user = Factory::create('Giftertipster\\Entity\\Eloquent\\User', ['permissions' => ['test']]);
$prod_req = Factory::create('Giftertipster\\Entity\\Eloquent\\ProductRequest', ['created_at' => Carbon::tomorrow(), 'user_id' => 1, 'product_id' => 1, 'vendor' => 'foo', 'vendor_id' => 'bar']);
$idea = Factory::create('Giftertipster\\Entity\\Eloquent\\Idea', ['created_at' => Carbon::today(), 'user_id' => 1, 'description' => 'foobar idea', 'is_fulfilled' => 0]);
$repo_result = $this->repo()->getIncompleteProductLoads(1);
//since keys aren't adjusted after sorting, re apply keys:
foreach ($repo_result as $item) {
$result[] = $item;
}
assertThat($result, not(emptyArray()));
assertThat($result[0], hasKeyValuePair('type', 'idea load'));
assertThat($result[0], hasKey('created_at'));
assertThat($result[0], hasKey('updated_at'));
assertThat($result[0], hasKey('description'));
assertThat($result[0], hasKeyValuePair('query', ['idea_description' => 'foobar idea']));
assertThat($result[0], hasKey('human_time_diff'));
assertThat($result, not(hasKey(1)));
}
示例2: getCancel
public function getCancel($user, $token)
{
switch ($token) {
case 'now':
$this->runCancel('', array('id' => $user->id));
break;
case 'later':
$date = Carbon::now()->addMinutes(15);
Queue::later($date, 'UserController@runCancel', array('id' => $user->id));
break;
case 'tomorrow':
$date = Carbon::tomorrow();
Queue::later($date, 'UserController@runCancel', array('id' => $user->id));
break;
case 'disable':
if ($user->cancelled) {
DB::table('users')->where('id', $user->id)->update(array('confirmed' => true, 'cancelled' => false));
}
break;
}
Activity::log(array('contentID' => $user->id, 'contentType' => 'account_cancelled', 'description' => $user->id, 'details' => '', 'updated' => $user->id));
return Redirect::to('user')->with('success', Lang::get('user/user.user_account_updated'));
}