Пример #1
0
 public function getDetail($id)
 {
     $family = Family::find($id);
     $sub_family = SubFamily::with("family")->where("family_id", "=", $id)->get();
     return view("familys.detail")->with(array('family' => $family, 'sub_family' => $sub_family));
     return redirect()->back();
 }
Пример #2
0
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function getIndex()
 {
     /*
      *  Igualamos la base de datos con mayúsculas
      */
     $sub_familys = SubFamily::get();
     foreach ($sub_familys as $sub_family) {
         $sub_family->description = strtoupper($sub_family->alias);
         $sub_family->save();
     }
 }