public function index(Request $request) { $workflows = Workflow::all(); if ($request->ajax()) { return response()->json(compact('workflows')); } return view('workflows.index')->withWorkflows($workflows); }
public function create() { $workflows = Workflow::all(); return view('checklists.create', compact('workflows')); }