当前位置: 首页>>代码示例>>PHP>>正文


PHP Carbon::tomorrow方法代码示例

本文整理汇总了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)));
 }
开发者ID:ryanrobertsname,项目名称:giftertipster.com,代码行数:19,代码来源:EloquentUserRepositoryTest.php

示例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'));
 }
开发者ID:Aranjedeath,项目名称:l4-starter,代码行数:23,代码来源:UserController.php


注:本文中的Carbon::tomorrow方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。