public function lista() { //$tasks = \App\Tasks::find(1); $tasks = \App\Tasks::all(); //echo "<pre>"; foreach ($tasks as $key => $value) { echo $value->title . "<br>"; } //print_r($tasks); //$users = User::all(); return view('list'); //>with($tasks); }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $data['tasks'] = Tasks::all(); return view('tasks.manage_types', $data); }
public function index() { $tasks = Tasks::all(); return view('tasks.index', compact('tasks')); }
public function index() { $response['tasks'] = Tasks::all(); return Response($response, 200); }