获取 Modules
This commit is contained in:
parent
e04ec2b6d9
commit
b21b2e6588
29
app/Http/Controllers/Application/ModuleController.php
Normal file
29
app/Http/Controllers/Application/ModuleController.php
Normal file
@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Application;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\Module;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class ModuleController extends Controller
|
||||
{
|
||||
//
|
||||
|
||||
// public function index() {
|
||||
// $modules = Module::all();
|
||||
//
|
||||
// return $this->success($modules);
|
||||
// }
|
||||
|
||||
|
||||
public function show(Module $module) {
|
||||
|
||||
|
||||
return $this->success($module);
|
||||
|
||||
// $module = Module::find(request()->route('module'));
|
||||
//
|
||||
// return $this->success($module);
|
||||
}
|
||||
}
|
@ -1,8 +1,17 @@
|
||||
<?php
|
||||
|
||||
use App\Http\Controllers\Application\ModuleController;
|
||||
use App\Http\Controllers\Application\MqttAuthController;
|
||||
|
||||
// 登录
|
||||
Route::post('mqtt/authentication', [MqttAuthController::class, 'authentication'])->name('mqtt.authentication');
|
||||
// 授权
|
||||
Route::post('mqtt/authorization', [MqttAuthController::class, 'authorization'])->name('mqtt.authorization');
|
||||
|
||||
// MQTT Auth
|
||||
Route::prefix('mqtt')->as('mqtt.')->group(function () {
|
||||
// 登录
|
||||
Route::post('authentication', [MqttAuthController::class, 'authentication'])->name('authentication');
|
||||
// 授权
|
||||
Route::post('authorization', [MqttAuthController::class, 'authorization'])->name('authorization');
|
||||
});
|
||||
|
||||
// Modules
|
||||
Route::get('modules', [ModuleController::class, 'index'])->name('modules.index');
|
||||
Route::get('modules/{module}', [ModuleController::class, 'show'])->name('modules.show');
|
||||
|
Loading…
Reference in New Issue
Block a user