/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(NoticiasRequest $request) { Noticia::create($request->all()); Session::flash('message', 'Noticia Publicada con Exito'); Redirect::to('noticias'); }
public function noticias() { $noticias = Noticia::with(['categoria', 'user'])->get(); return response()->json($noticias); }