web.php
2.4 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
<?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::get('/', function () {
return view('index');
});
Route::group(['middleware' => ['cors']], function () {
// Route::any('/', 'StatisticsController@index')->name('statistics.index');
// Route::any('statistics', 'StatisticsController@index')->name('statistics.index');
// Route::any('statistics/count', 'StatisticsController@count')->name('statistics.count');
// Route::any('statistics/smoke-warnings', 'StatisticsController@smokeWarnings')->name('statistics.smoke-warnings');
// Route::any('statistics/new-tenant', 'StatisticsController@newTenant')->name('statistics.new-tenant');
// Route::any('statistics/alarms', 'StatisticsController@alarms')->name('statistics.alarms');
// Route::any('statistics/rooms', 'StatisticsController@rooms')->name('statistics.rooms');
// Route::any('statistics/smoke-abnormal', 'StatisticsController@smokeAbnormal')->name('statistics.smoke-abnormal');
// Route::any('statistics/lock-abnormal', 'StatisticsController@lockAbnormal')->name('statistics.lock-abnormal');
// Route::any('statistics/map', 'StatisticsController@getMapData')->name('statistics.map');
// Route::any('statistics/building-data', 'StatisticsController@getBuildingData')->name('statistics.map');
// 图片缩略图
Route::get('image/thumb', 'ImageController@thumb')->name('image.thumb');
// 视频上传
Route::any('upload/video', 'VideoController@store')->name('upload.video');
// 图片上传
Route::any('upload', 'ImageController@store')->name('upload.image');
// 七牛云图片上传
Route::any('qiniu-upload', 'QiniuUploadController@store')->name('qiniu.upload.file');
Route::any('qiniu-delete', 'QiniuUploadController@destroy')->name('qiniu.delete.file');
});
//use App\Services\ChatServer;
//use Ratchet\Http\HttpServer;
//use Ratchet\WebSocket\WsServer;
//use Ratchet\Server\IoServer;
//
//$server = IoServer::factory(
// new HttpServer(
// new WsServer(
// new ChatServer()
// )
// ),
// 8080
//);
//
//$server->run();