when($request->input('name'), function ($query, $name) { return $query->where('name', 'like', '%' . $name . '%'); }) ->paginate(10); return view('pages.fuzzy.variabel.index', compact('variabels', 'count')); } /** * Show the form for creating a new resource. */ public function create() { // } /** * Store a newly created resource in storage. */ public function store(Request $request) { // } /** * Display the specified resource. */ public function show($id) { $count = 1; $variabel = Variabel::findOrFail($id); $keanggotaans = $variabel->keanggotaan; // dd($variabel, $keanggotaan); return view('pages.fuzzy.variabel.show', compact('count', 'variabel', 'keanggotaans')); } /** * Show the form for editing the specified resource. */ public function edit(Variabel $variabel) { // } /** * Update the specified resource in storage. */ public function update(Request $request, Variabel $variabel) { // } /** * Remove the specified resource from storage. */ public function destroy(Variabel $variabel) { // } }