Exemple #1
0
Route::post('/ajax/postborrow', function () {
    \Log::info("i am in postborrow function");
    $a = Request::input('ownedBookListId');
    $b = Request::input('borrowerId');
    $c = Request::input('days');
    \Log::info(Request::input());
    Book::insertToBorrowHistoryTable($a, $b, $c);
    //	\Log::info(Request::input());
    $data = array('value' => 'from post some data returning', 'input' => Request::input());
    // return a JSON response
    return Response::json($data);
});
Route::post('/ajax/postlended', function () {
    $a = Request::input('ownedBookListId');
    $b = Request::input('borrowerId');
    Book::updateBorrowHistoryTable($a, $b);
    \Log::info(Request::input());
    $data = array('value' => 'from post some data returning', 'input' => Request::input());
    // return a JSON response
    return Response::json($data);
});
Route::post('/ajax/postreview', function () {
    // pass back some data, along with the original data, just to prove it was received
    //$CategoryName = $request->input('ownerId', 'CategoryName not set');
    //	\Log::info($CategoryName);
    $a = Request::input('userId');
    $b = Request::input('borrowerId');
    $c = Request::input('point');
    Book::updateReputaionTable($a, $b, $c);
    \Log::info("...........about to log a and b");
    \Log::info($a);