| 12345678910111213141516171819202122232425262728293031 | 
							- <?php
 
- /*
 
- |--------------------------------------------------------------------------
 
- | Web Routes
 
- |--------------------------------------------------------------------------
 
- |
 
- | Here is where you can register web routes for your application. These
 
- | routes are loaded by the RouteServiceProvider within a group which
 
- | contains the "web" middleware group. Now create something great!
 
- |
 
- */
 
- //心跳
 
- Route::any('/request/heartbeat', 'Api\DeviceController@heartbeat');
 
- //上传名单回调
 
- Route::any('/request/addperson', 'Api\DeviceController@addperson');
 
- //获取人脸图片地址
 
- Route::any('/capture', 'Api\DeviceController@capture');
 
- Route::get('/image/{filename}', function ($filename) {
 
-     $path = storage_path('app/public/kq/' . $filename);
 
-     $path = $path.'.jpg';
 
-     if (!File::exists($path)) {
 
-         abort(404);
 
-     }
 
-     $file = File::get($path);
 
-     $type = File::mimeType($path);
 
-     return response($file, 200)->header('Content-Type', $type);
 
- });
 
 
  |