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


PHP Task::unfinished方法代码示例

本文整理汇总了PHP中app\Task::unfinished方法的典型用法代码示例。如果您正苦于以下问题:PHP Task::unfinished方法的具体用法?PHP Task::unfinished怎么用?PHP Task::unfinished使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Task的用法示例。


在下文中一共展示了Task::unfinished方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: home

 public function home()
 {
     $page_title = "لوحة التحكم";
     $section_title = "لوحة التحكم";
     Date::setLocale('ar');
     $date = Date::now()->format('j F Y');
     $day = Date::now()->format('l');
     $month = Date::now()->format('F');
     $year = Date::now()->format('Y');
     //**************Tasks***************
     $tasksUnfinished = Task::unfinished();
     $tasksToday = Task::orderBy('task_date', 'desc')->today()->take(5);
     $tasksWeek = Task::orderBy('task_date', 'desc')->thisweek()->take(5);
     $tasksMonth = Task::orderBy('task_date', 'desc')->thisMonth()->take(5);
     $tasks_count = count($tasksUnfinished->toArray());
     //**************Fails***************
     $failsunfixed = Failure::waiting();
     $failsToday = Failure::orderBy('fail_time', 'desc')->today()->take(5);
     $failsWeek = Failure::orderBy('fail_time', 'desc')->thisweek()->take(5);
     $failsMonth = Failure::orderBy('fail_time', 'desc')->thisMonth()->take(5);
     $fails_count = count($failsunfixed->toArray());
     //**************Repairs***************
     $repairsBox = Repair::finished();
     $repairsToday = Repair::today();
     $repairsWeek = Repair::thisweek();
     $repairsMonth = Repair::thisMonth();
     $repairs_count = count($repairsBox);
     return view('dashboard.dashboard', compact('page_title', 'section_title', 'date', 'day', 'month', 'year', 'tasksToday', 'tasksMonth', 'tasksWeek', 'tasks_count', 'failsToday', 'failsMonth', 'failsWeek', 'fails_count', 'repairsToday', 'repairsMonth', 'repairsWeek', 'repairs_count'));
 }
开发者ID:ashraf2033,项目名称:CloudManagementSystem,代码行数:29,代码来源:PagesController.php

示例2: filter

 public function filter($filter)
 {
     if ($filter == "Completed") {
         $tasks = Task::finished()->get();
         return view('tasks.index', compact('tasks'));
     } elseif ($filter == "Pending") {
         $tasks = Task::unfinished()->get();
         return view('tasks.index', compact('tasks'));
     } else {
         return redirect('todo');
     }
 }
开发者ID:aditya-cherukuri,项目名称:todo_app,代码行数:12,代码来源:TasksController.php


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