コード例 #1
0
ファイル: routes.php プロジェクト: awidarto/jexadmin
Route::get('xcat', function () {
    print_r(Prefs::getCategory());
});
Route::get('barcode/dl/{txt}', function ($txt) {
    $barcode = new Barcode();
    $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