/**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index($id)
 {
     if ($id != null || intval($id) > 0) {
         $user = Member::find(intval($id));
         $payment = Payment::filterByServiceAndMember(1, $user->id)->first();
         //membership
         $journal = Journal::where('payment_id', $payment->id);
         return view('backend.memberships.payment', compact('user', 'payment', 'journal'));
     }
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(Request $request, $id)
 {
     $journals = Journal::whereid($id)->firstOrfail();
     if (isset($request->img)) {
         $Image = $request->img;
         //dd($Image);
         $imagePath = $this->imageUpload($Image);
         //call public function imageUpload for small img
     } else {
         $imagePath = Journal::where('id', '=', $id)->pluck('logo');
         //dd($imagePath);
     }
     $journals->title = $request->get('title');
     $journals->description = $request->get('description');
     $journals->frequency = $request->get('frequency');
     $journals->logo = $imagePath;
     $journals->language = $request->get('language');
     $journals->save();
     return redirect('/BARD_journal');
 }
 /**
  * Show the form for creating a new resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function Volumes($id)
 {
     $journal = Journal::where('id', '=', $id)->pluck('title');
     $volumes = Volume::wherejournals_id($id)->get();
     return view('public_journal.volumes', compact('volumes', 'journal'));
 }