예제 #1
0
 public function news()
 {
     $subtitle = "Showing All News Items";
     $news_items = Blog_Item::orderBy('created_at', 'desc')->get();
     return view('news.admin', compact('news_items', 'subtitle'));
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int  $id
  * @return Response
  */
 public function destroy($id)
 {
     $news_item = Blog_Item::findOrFail($id);
     $news_item->delete();
     return Redirect::to('admin/news')->with("good", "Successfully deleted news item.");
 }