コード例 #1
0
ファイル: routes.php プロジェクト: RonaldvanMeer/firefly-iii
        }
    }
    throw new NotFoundHttpException();
});
Route::bind('currency', function ($value) {
    if (Auth::check()) {
        $object = TransactionCurrency::find($value);
        if ($object) {
            return $object;
        }
    }
    throw new NotFoundHttpException();
});
Route::bind('bill', function ($value) {
    if (Auth::check()) {
        $object = Bill::where('id', $value)->where('user_id', Auth::user()->id)->first();
        if ($object) {
            return $object;
        }
    }
    throw new NotFoundHttpException();
});
Route::bind('budget', function ($value) {
    if (Auth::check()) {
        $object = Budget::where('id', $value)->where('user_id', Auth::user()->id)->first();
        if ($object) {
            return $object;
        }
    }
    throw new NotFoundHttpException();
});