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


PHP Task::all方法代码示例

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


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

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $tasks = $this->task->all();
     //var_dump(getenv('DB_HOST'));
     return View::make('tasks.index', compact('tasks'));
     //return View::make('tasks.stuff');
 }
开发者ID:aletuan,项目名称:forge-demo,代码行数:12,代码来源:TasksController.php

示例2: index

 public static function index()
 {
     self::check_logged_in();
     $tasks = Task::all();
     //Get all tasks from db
     View::make('task/index.html', array('tasks' => $tasks));
 }
开发者ID:rubinju,项目名称:Todolist,代码行数:7,代码来源:tasks_controller.php

示例3: index

 public static function index()
 {
     // make-metodi renderöi app/views-kansiossa sijaitsevia tiedostoja
     $tasks = Task::all(self::get_user_logged_in()->id);
     $categories = Category::all(self::get_user_logged_in()->id);
     View::make('dashboard.html', array('tasks' => $tasks, 'categories' => $categories, 'category' => 'all'));
 }
开发者ID:sofiak,项目名称:Tsoha-Bootstrap,代码行数:7,代码来源:app_controller.php

示例4: tasks

 public function tasks($project_id)
 {
     $organization = app('organization');
     // Load tasks
     $tasks = Task::all();
     foreach ($tasks as $task) {
         echo $task['name'];
         /*
         if ($task['status'] == 0) {
             $data['stories'][] = $task;
         } elseif ($task['status'] == 1) {
             $data['tasks'][] = $task;
         } elseif ($task['status'] == 2) {
             $data['tests'][] = $task;
         } elseif ($task['status'] == 3) {
             $data['done'][] = $task;
         }
         */
     }
     /*
             foreach ($tasks as $task) {
                 if ($task['status'] == 0) {
                     $data['stories'][] = $task;
                 } elseif ($task['status'] == 1) {
                     $data['tasks'][] = $task;
                 } elseif ($task['status'] == 2) {
                     $data['tests'][] = $task;
                 } elseif ($task['status'] == 3) {
                     $data['done'][] = $task;
                 }
             }
     */
     // Load project info
     /* $this->load->model('project_model');
        $project = $this->project_model->get($project_id);
        
        $this->title = "Project: {$project['name']}";
        $this->menu = 'dashboard|edit_project|new_task';
        
        $data['project_id']    = $project_id;
        
        $data['current_user'] = $this->session->userdata('user');
        
        $db_users = $this->project_model->get_related_users($project_id);
        $users = array();
        foreach ($db_users as $user) {
            $users[$user['id']] = $user;
        }
        $data['users'] = $users;
        
        $this->load->view('task_board', $data); */
 }
开发者ID:josimarjimenez,项目名称:architects,代码行数:52,代码来源:TaskBoardController.php

示例5: generateShow

 /**
  * Generate list tasks
  *
  * @return Response
  */
 public function generateShow()
 {
     $datas = array();
     if (Auth::check()) {
         $datas['tasks'] = Task::all();
     }
     $datas['labels'] = TasksLabels::all();
     return $datas;
     /*if (Request::ajax()) {
     			return Response::json(View::make('theme::' . 'tasks.list', $datas )->renderSections());
     		} else {
     			return View::make('theme::' . 'tasks.display', $datas );
     		}*/
 }
开发者ID:Metrakit,项目名称:dynamix,代码行数:19,代码来源:AdminTasksController.php

示例6: testGetsCurrentTeamTasks

 public function testGetsCurrentTeamTasks()
 {
     auth()->login($this->user);
     $task = new Task();
     $task->team_id = $this->user->currentTeam->getKey();
     $task->name = 'Buy milk';
     $task->save();
     $task2 = new Task();
     $task2->team_id = $this->user->currentTeam->getKey() + 1;
     $task2->name = 'Buy steaks';
     $task2->save();
     $tasks = Task::all();
     $this->assertCount(1, $tasks);
     $this->assertEquals($task->id, $tasks->first()->id);
     $this->assertEquals($task->team_id, $tasks->first()->team_id);
     $this->assertEquals($task->name, $tasks->first()->name);
 }
开发者ID:mpociot,项目名称:teamwork,代码行数:17,代码来源:UsedByTeamsTraitTest.php

示例7: getTasks

 public function getTasks()
 {
     $users = Task::all();
     return Response::json($users);
 }
开发者ID:AnthonyLima,项目名称:laravel-almacen,代码行数:5,代码来源:TaskController.php

示例8: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return Task::all();
 }
开发者ID:elagith,项目名称:learningMaterial,代码行数:9,代码来源:TasksController.php

示例9: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     return View::make('tasks.index')->with('tasks', Task::all())->with('title', 'Tasks');
 }
开发者ID:x4rMa,项目名称:Vehicle-Inspection-System,代码行数:9,代码来源:TaskController.php

示例10: array

     $results = array();
     foreach ($data as $datum) {
         $group = TaskGroup::with_obje($datum);
         if ($group) {
             $result = $group->save();
             $results[] = $result;
         } else {
             $results[] = null;
         }
     }
     $json = json_encode($results);
     break;
 case 'task.list':
     $datum = json_decode($req_json);
     #debug_foreach($datum);
     $tasks = Task::all($datum->group_id);
     if (empty($tasks)) {
         $tasks = array();
     }
     $json = json_encode($tasks);
     break;
 case 'task.create':
     #debug($req_json);
     $datum = json_decode($req_json);
     #debug_foreach($datum);
     $task = Task::with_obje($datum);
     if ($task) {
         $result = $task->save();
         $task->note()->save();
         $json = json_encode($result);
     }
开发者ID:nottoowell,项目名称:drizzle,代码行数:31,代码来源:task.handler.php

示例11: home

 public function home()
 {
     $tasks = Task::all();
     return View::make('home', compact('tasks'));
 }
开发者ID:christean,项目名称:todolist,代码行数:5,代码来源:TasksController.php

示例12: manageTask

 public function manageTask()
 {
     $tasks = Task::all();
     return View::make('task.manage')->with('tasks', $tasks);
 }
开发者ID:RHoKAustralia,项目名称:onaroll21_backend,代码行数:5,代码来源:TaskController.php

示例13: create

 public function create()
 {
     $tasks = Task::all();
     return view('tasks.create')->withTasks($tasks);
 }
开发者ID:gokulraja01,项目名称:Test,代码行数:5,代码来源:TasksController.php

示例14: function

     Route::get('/', function () {
         return View::make('admin.projects.index', ['active_link' => 'projects', 'projects' => Project\Project::all()]);
     });
 });
 // ------------------------------------------------------------------------
 // Tasks
 // ------------------------------------------------------------------------
 Route::group(['prefix' => 'tasks'], function () {
     Route::get('/', function () {
         /*return [
         		'total'=>Task::all()->count(),
         		'active_tasks'=>Task::active()->count(),
         		'expired_tasks'=>Task::expired()->count(),
         		'calc'=>(Task::active()->count()+Task::expired()->count())
         		];*/
         return View::make('admin.tasks.index', ['active_link' => 'tasks', 'tasks' => Task::all(), 'active_tasks' => Task::active()->get(), 'expired_tasks' => Task::expired()->get()]);
     });
 });
 // ------------------------------------------------------------------------
 // Tags CMS
 // ------------------------------------------------------------------------
 Route::group(['prefix' => 'tags'], function () {
     Route::get('/', function () {
         return View::make('admin.tags.index', ['active_link' => 'tags']);
     });
     Route::get('{id}', function ($id) {
         return View::make('admin.tags.edit', ['active_link' => 'tags', 'tag' => Tag::find($id)]);
     });
     Route::post('/', ['uses' => 'TagsController@store']);
     Route::put('{id}', ['uses' => 'TagsController@update']);
     Route::delete('{id}', ['uses' => 'TagsController@destroy']);
开发者ID:vanderlin,项目名称:halp,代码行数:31,代码来源:admin_routes.php


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