/** * Store a newly created resource in storage. * * @param Request $request * @return Response */ public function store(AdminSourcesRequest $request) { $source = $request->All(); // if a thumbnail is uploaded send file to be processed (cropped, resized ..etc), else, use twitter's thumb. if ($request->hasFile('thumb')) { $this->dispatchFrom('\\App\\Jobs\\processUploadedThumbs', $request); } // else { // $this->dispatchFrom('\App\Jobs\processTwitterThumbs', $request); // } $result = Source::Create($source); return Redirect::Route('admin.sources.index')->withMessage('Success!'); }