Beispiel #1
0
 public function resolveById($id)
 {
     return Task::find($id);
 }
Beispiel #2
0
 /**
  * Resolve connection.
  *
  * @param  mixed  $parent
  * @param  array  $args
  * @param  mixed  $context
  * @param  ResolveInfo $info
  * @return mixed
  */
 public function resolve($parent, array $args, $context, ResolveInfo $info)
 {
     return Task::whereHas('user', function ($query) use($parent) {
         $query->where('id', $parent->id);
     })->getConnection($args);
 }