$barcode->make($txt, 'code128', 60, 'horizontal', true); return $barcode->render('jpg', $txt, true); }); Route::get('barcode/{txt}', function ($txt) { $barcode = new Barcode(); $barcode->make($txt, 'code128', 60, 'horizontal', true); return $barcode->render('jpg', $txt); }); Route::get('qr/{txt}', function ($txt) { $txt = base64_decode($txt); return QRCode::format('png')->size(399)->color(40, 40, 40)->generate($txt); }); Route::get('pdf417/{txt}', function ($txt) { $txt = base64_decode($txt); header('Content-Type: image/svg+xml'); print DNS2D::getBarcodeSVG($txt, "PDF417"); }); Route::get('media', function () { $media = Product::all(); print $media->toJson(); }); Route::get('login', function () { return View::make('login')->with('title', 'Sign In'); }); Route::post('login', function () { // validate the info, create rules for the inputs $rules = array('email' => 'required|email', 'password' => 'required|alphaNum|min:3'); // run the validation rules on the inputs from the form $validator = Validator::make(Input::all(), $rules); // if the validator fails, redirect back to the form if ($validator->fails()) {