当前位置: 首页>>代码示例>>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;未经允许,请勿转载。