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


PHP Task::all方法代码示例

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


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

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //
     $tasks = Task::all();
     return view('tasks.index')->withTasks($tasks);
     //eturn $tasks->all();
 }
开发者ID:javed24,项目名称:lodger,代码行数:12,代码来源:TasksController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // 1. No es retorna: paginacion
     //return Task::all();
     $task = Task::all();
     return Response::json(['data' => $this->transformCollection($task)], 200);
 }
开发者ID:pdavila13,项目名称:tasksAPI2,代码行数:12,代码来源:TaskController.php

示例3: tasks

 public function tasks()
 {
     $tasks = Task::all();
     // $taskUsers = array();
     $view = view('admin.tasks', ['tasks' => $tasks]);
     return $view;
 }
开发者ID:kernspaltung,项目名称:robocoop,代码行数:7,代码来源:AdminController.php

示例4: update

 public function update(Request $request, $id)
 {
     array_forget($request, "_token");
     $all_request = $request->all();
     $task = Task::find($id);
     foreach ($all_request as $key => $value) {
         /*
          * remove all underscore contained
          * in the edit form field
          */
         $key = preg_replace("/^_/", "", $key);
         $task->{$key} = $value;
     }
     if ($task->update()) {
         \Session::flash("success_message", "Task Successfully Updated");
     } else {
         \Session::flash("error_message", "Unexpected Error Task could not be updated");
     }
     $tasks = Task::all();
     if ($request->ajax()) {
         response()->json("Task Successfully Updated");
         exit;
         // return \Redirect::back();
     }
     return View("taskmanager.index", ['tasks' => $tasks, 'title' => 'Tasks']);
 }
开发者ID:runningjack,项目名称:coalitionlaravel2,代码行数:26,代码来源:TaskController.php

示例5: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     //1. No és retorna: paginació
     //return Task::all();
     $task = Task::all();
     return $this->respond($this->taskTransformer->transformCollection($task->all()));
 }
开发者ID:Germangalia,项目名称:tasksAPI,代码行数:12,代码来源:TaskController.php

示例6: index

 /**
  * Display a list of all of the user's task.
  *
  * @param  Request  $request
  * @return Response
  */
 public function index(Request $request)
 {
     //        return view('tasks.index', [
     //            'tasks' => $this->tasks->forUser($request->user()),
     //        ]);
     $tasks = Task::all();
     return view('tasks.index', ['tasks' => $tasks]);
 }
开发者ID:anhtt93,项目名称:BookStore,代码行数:14,代码来源:TaskController.php

示例7: index

 public function index()
 {
     //
     $user = Auth::user();
     //  echo $user->name;
     $tasks = Task::all();
     return view('tasks.index')->withTasks($tasks);
 }
开发者ID:santoshpawar,项目名称:vamaship-laravel-test,代码行数:8,代码来源:TasksController.php

示例8: index

 public function index()
 {
     $tasks = Task::all();
     //return $tasks;
     //return view('task.index',compact('tasks'));
     return view('tasks.index', compact('tasks'));
     //return view('welcome');
 }
开发者ID:ali-sharifi,项目名称:laravel,代码行数:8,代码来源:TaskController.php

示例9: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     if (Sentinel::hasAccess('task.view')) {
         $tasks = Task::all();
         return view('notifications.tasks.tasks', compact('tasks'));
     } else {
         return back()->withErrors(['NoAccess' => 'No tiene permisos para acceder a esta area.']);
     }
 }
开发者ID:gitfreengers,项目名称:larus,代码行数:14,代码来源:TasksController.php

示例10: liste

 public function liste()
 {
     if (Auth::user()) {
         $id = Auth::user()->id;
     }
     $tasks = Task::all()->where('user_id', $id);
     $lists = Liste::all()->where('user_id', $id);
     return view('list', compact('tasks', 'lists'));
 }
开发者ID:jay44913,项目名称:todo,代码行数:9,代码来源:ListeTaskController.php

示例11: todolist

 public function todolist()
 {
     //return View::make('todolist');
     $tasks = Task::all();
     return View::make('todolist')->with('tasks', $tasks);
     //or
     // return View::make('todolist', compact('tasks'));
     //or
     //return View::make('home',['tasks'=> $tasks]);
 }
开发者ID:piyushpk89,项目名称:MasteringLaravelCode_by_Christopher_John,代码行数:10,代码来源:TasksController.php

示例12: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $tasks = Task::all();
     //
     //
     //$task = Task::all();
     //        return $this->respond([
     //            'data' => $this->TaskTransformer->transformCollection($task->all())
     //        ]);
     return Response::json($this->TaskTransformer->transformCollection($tasks), 200);
 }
开发者ID:sergipineda,项目名称:tasksAPI,代码行数:16,代码来源:TaskController.php

示例13: getIndex

 public function getIndex()
 {
     $user = \Auth::user();
     $pendings = User::where('standing', 'unconfirmed')->get();
     $event = $this->currentEvent();
     $committee = Committee::where('event_id', $event->id)->get();
     $committees = Committee::all();
     $heads = Head::all();
     $users = User::all();
     $events = Event::all();
     $tasks = Task::all();
     return view('admin/admin', compact('user', 'users', 'pendings', 'events', 'event', 'heads', 'committee', 'committees', 'tasks'));
 }
开发者ID:zoekayvee,项目名称:YSESTracker,代码行数:13,代码来源:AdminController.php

示例14: index

 public function index()
 {
     //Envoi de mail
     /*
     Mail::send('emails.test', ['user' => 'ludo'], function ($message) {
       $message->from('ludo.troiswa@gmail.com', 'Your Application');
     
       $message->to('ludo.troiswa@gmail.com')->subject('Your Reminder!');
     });
     */
     $tasks = Task::all();
     return view('task.index', compact('tasks'));
 }
开发者ID:unpetitlu,项目名称:laravel-ecommerce,代码行数:13,代码来源:TaskController.php

示例15: randomize

 public function randomize()
 {
     $users = User::all();
     $tasks = Task::all();
     srand((double) microtime() * 10000);
     foreach ($users as $user) {
         if (rand(0, 2) == 1) {
             $taskExemption = new TaskExemption();
             $taskExemption->user_id = $user->id;
             $taskExemption->task_id = $tasks[rand(0, count($tasks) - 1)]->id;
             $taskExemption->save();
         }
     }
 }
开发者ID:PLANKandre,项目名称:dashboard,代码行数:14,代码来源:TaskExemptionSeeder.php


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