本文整理匯總了PHP中app\Task::whereDate方法的典型用法代碼示例。如果您正苦於以下問題:PHP Task::whereDate方法的具體用法?PHP Task::whereDate怎麽用?PHP Task::whereDate使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類app\Task
的用法示例。
在下文中一共展示了Task::whereDate方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: index
/**
* Application landing page
*
*/
public function index()
{
$title = 'Welcome To Performance Analyzer';
$thisDaysTask = null;
if (auth()->check() && auth()->user()) {
$thisDaysTask = Task::whereDate('deadline', '=', date('Y-m-d'))->myTask()->orderBy('status', 'ASC')->paginate(10);
if (count($thisDaysTask) < 1) {
flash()->info('It seems that you\'re free today !');
}
}
return view('welcome', compact('title', 'thisDaysTask'));
}
示例2: failed
/**
* Display the failed task list.
*
* @return \Illuminate\Http\Response
*/
public function failed()
{
$title = 'Failed Task List';
$tasks = Task::whereDate('deadline', '<', date('Y-m-d'))->whereStatus(0)->myTask()->orderBy('status', 'ASC')->paginate(10);
return view('private.task.index', compact('title', 'tasks'));
}