/** * Show the form for creating a new resource. * * @return Response */ public function create() { $types = LeaveType::all()->lists('name', 'id'); return view('leaves.create', compact('types')); }
public function types() { return LeaveType::all(); }
/** * Display a listing of the resource. * * @return Response */ public function index() { $types = LeaveType::all(); return view('leave_types.index', compact('types')); }