I have a plugin that has a routes.php file that defines some routes to backend controller methods.
Route::group(['middleware' => ['web']], function () {
// I've changed the backend URI from backend to admin
Route::get('admin/neil/myplugin/api/data', 'Neil\MyPlugin\Controllers\MyPluginController@data');
});
Although this does work, it's not protected by any authentication, meaning I get data without being logged into the backend,
Do I have to include some sort of middleware or should this be handled automatically because the url starts with "/admin" ?
Last updated