/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(Request $request) { Noticia::create($request->all()); //Crear miniatura de la imagen de la noticia $file = Input::file('imagen'); $thumb = Image::make(Input::file('imagen')); $ruta = public_path() . '/uploads/noticias/thumbs/'; $thumb->resize(160, 100); $thumb->save($ruta . 'thumb_' . \Carbon::now()->second . $file->getClientOriginalName()); Flash::success('La noticia se agrego correctamente'); return redirect()->route('admin.noticia.index'); }
/** * Store a newly created resource in storage. * * @return Response */ public function store(CreateBoletinRequest $request) { $boletin = Noticia::create($request->except('_token')); return Redirect::to('adminpage/Boletin')->with('notice', 'Elemento ingresado exitosamente!'); }