29 lines
914 B
PHP
29 lines
914 B
PHP
<?php
|
|
|
|
use Illuminate\Http\Request;
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| API Routes
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here is where you can register API routes for your application. These
|
|
| routes are loaded by the RouteServiceProvider within a group which
|
|
| is assigned the "api" middleware group. Enjoy building your API!
|
|
|
|
|
*/
|
|
|
|
Route::post('/siswa', 'SiswaController')->name('siswa.retrieve');
|
|
|
|
Route::post('/hasil_belajar', 'HasilBelajarController')->name('hasilBelajar.retrieve');
|
|
|
|
Route::get('/access_log', 'AccessLogController')->name('accessLog.fetch');
|
|
Route::post('/access_log', function(Request $request) {
|
|
return response()->json([], 404);
|
|
/*
|
|
* Write a new access log
|
|
*
|
|
*/
|
|
App\AccessLog::create(['siswa_id' => $request->siswaId, 'src' => $request->src]);
|
|
})->name('accessLog.create');
|