當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Task::get方法代碼示例

本文整理匯總了PHP中app\Task::get方法的典型用法代碼示例。如果您正苦於以下問題:PHP Task::get方法的具體用法?PHP Task::get怎麽用?PHP Task::get使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在app\Task的用法示例。


在下文中一共展示了Task::get方法的6個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: create

 /**
  * @param $projectId
  * @return mixed
  */
 public function create($projectId)
 {
     $param['pageNo'] = 1;
     $param['projectId'] = $projectId;
     $param['tasks'] = TaskModel::get();
     $param['skills'] = SkillModel::lists('name', 'name');
     return View::make('company.task.create')->with($param);
 }
開發者ID:michaelotto126,項目名稱:shokes,代碼行數:12,代碼來源:TaskController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Request $request)
 {
     if ($request->query('list_id') !== NULL) {
         $list = TodoList::find($request->query('list_id'));
         $tasks = $list->tasks;
     } else {
         $tasks = Task::get();
     }
     return response()->json($tasks);
 }
開發者ID:stevesteve,項目名稱:todo,代碼行數:15,代碼來源:TaskController.php

示例3: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index(Request $request, $id = Null)
 {
     $user = Auth::user();
     // If the user is not an Admin, only show his own tasks
     if ($user->is_admin) {
         if ($request->is('*/user/*')) {
             $tasks = Task::where('user_id', $id)->get();
         } elseif ($request->is('*/category/*')) {
             $tasks = Task::where('category_id', $id)->get();
         } else {
             $tasks = Task::get();
         }
         // also retrieve the trashed tasks
         $trashed = Task::onlyTrashed()->get();
     } else {
         $tasks = Task::where('user_id', $user->id)->get();
         // also retrieve the trashed tasks
         $trashed = Task::onlyTrashed()->get();
     }
     $heading = 'My Tasks';
     //
     return view('tasks', array('tasks' => $tasks, 'heading' => $heading, 'trashed' => $trashed));
 }
開發者ID:matthiku,項目名稱:LaravelWithSocialite,代碼行數:28,代碼來源:TaskController.php

示例4: index

 /**
  * Send back all tasks as JSON
  *
  * @return Response
  */
 public function index()
 {
     return response()->json(Task::get());
 }
開發者ID:JChacks,項目名稱:TodoList,代碼行數:9,代碼來源:TaskController.php

示例5: forUser

 /**
  * Get all of the tasks for a given user.
  *
  * @param  User  $user
  * @return Collection
  */
 public function forUser(Task $task, User $user)
 {
     return Task::get();
 }
開發者ID:Graychen,項目名稱:quickstart_laravel,代碼行數:10,代碼來源:TaskRepository.php

示例6: index

 public function index()
 {
     $tasks = Task::get();
     return view('tasks.index')->with('tasks', $tasks);
 }
開發者ID:ahmedash95,項目名稱:todos,代碼行數:5,代碼來源:TasksController.php


注:本文中的app\Task::get方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。