예제 #1
0
|
|
|
*/
// Route::get('eventts/api', function(){ return Response::json(['eventts'=> json_decode(Eventt::all())]);});
// Route::get('test', function(){ return All::getSidelink(); });
// Route::get('api', function(){ return All::getRandomRecords(); });
// Route::get('api', function(){ return All::getLatestRecords(); });
Route::get('api', function () {
    return All::getAllRecords();
});
Route::post('api', function () {
    return All::getCoveredRecords();
});
Route::get('api/search', function () {
    return All::ajaxByLetters();
});
Route::get('{path}/api', function ($path) {
    return All::getModelRecords();
});
Route::get('{resource}/{id}/api', function ($resource, $id) {
    return All::getRecord($resource, $id);
})->where('id', '[0-9]+');
Route::get('{resource}/{id}/edit/api', function ($resource, $id) {
    return All::getRecord($resource, $id);
})->where('id', '[0-9]+');
/*
|--------------------------------------------------------------------------
| Deleting via get Request
|--------------------------------------------------------------------------
|