Example #1
0
 /**
  * Show the application dashboard to the user.
  *
  * @return Response
  */
 public function index()
 {
     $borrowList = "";
     $borrows = Borrow::all();
     foreach ($borrows as $item) {
         $borrowList = $borrowList . "<tr>\n\t\t\t\t\t\t\t\t<td>" . $item->book->title . "</td><td>" . $item->book->author . "</td>\n\t\t\t\t\t\t\t\t<td>" . $item->user->name . "</td><td>" . $item->created_at . "</td><td>Return Book.</td>\n\t\t\t\t\t\t\t</tr>";
     }
     return view('home')->with(compact('borrowList'));
 }