コード例 #1
0
ファイル: GiftController.php プロジェクト: m-gamal/crm
 public function doDelete($id)
 {
     $gift = Gift::findOrFail($id);
     try {
         $gift->delete();
         return redirect()->back()->with('message', 'Gift has been deleted successfully !');
     } catch (ParseException $ex) {
         echo 'Failed to create new meal , with error message: ' . $ex->getMessage();
     }
 }
コード例 #2
0
ファイル: GiftsController.php プロジェクト: onyx26/giftlist
 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function show($id)
 {
     $gift = Gift::findOrFail($id);
     return view('gifts.show')->with('gift', $gift);
 }
コード例 #3
0
ファイル: GiftController.php プロジェクト: louisthaihv/colong
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function destroy($id)
 {
     $gift = Gift::findOrFail($id);
     $gift->delete();
     return redirect()->route('admin.gifts.index')->with('message', 'Xóa thành công');
 }