Я настраиваю приложение laravel 5.3, которое использует пользовательские пакеты и промежуточное ПО для проверки подлинности laravel. Когда я определяю маршруты в laravel / packages / vendor / packageName / src / routes.php, как в случае с
Route::get('member/list', function() {
return 'member lists here';
})->middleware('auth');
он перенаправляет на localhost: 8000 / url-адрес панели управления, определенный в промежуточном программном обеспечении RedirectIfAuthenticated, но когда я определяю маршрут в resources / routes / web.php, он выполняет маршрутизацию и авторизацию по мере необходимости.
Есть ли что-то, что я делаю неправильно, или что-то мне нужно проверить?
--- Обновление --- Ниже приведен фрагмент моего класса ServiceProvider
namespace Beansoft\PractitionerIMS;
use Illuminate\Support\ServiceProvider;
class PractitionerIMSServiceProvider extends ServiceProvider {
public function register() {
$this->app->bind('practitionerims', function($app) {
return new PractitionerIMS;
});
}
public function boot() {
//load the routes file
if (!$this->app->routesAreCached()) {
require __DIR__ . '/Http/routes.php';
}
}
Приложение / Config / app.php
'providers' => [
/*
* Laravel Framework Service Providers...
*/
Illuminate\Auth\AuthServiceProvider::class,
Illuminate\Broadcasting\BroadcastServiceProvider::class,
Illuminate\Bus\BusServiceProvider::class,
Illuminate\Cache\CacheServiceProvider::class,
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class,
Illuminate\Cookie\CookieServiceProvider::class,
Illuminate\Database\DatabaseServiceProvider::class,
Illuminate\Encryption\EncryptionServiceProvider::class,
Illuminate\Filesystem\FilesystemServiceProvider::class,
Illuminate\Foundation\Providers\FoundationServiceProvider::class,
Illuminate\Hashing\HashServiceProvider::class,
Illuminate\Mail\MailServiceProvider::class,
Illuminate\Notifications\NotificationServiceProvider::class,
Illuminate\Pagination\PaginationServiceProvider::class,
Illuminate\Pipeline\PipelineServiceProvider::class,
Illuminate\Queue\QueueServiceProvider::class,
Illuminate\Redis\RedisServiceProvider::class,
Illuminate\Auth\Passwords\PasswordResetServiceProvider::class,
Illuminate\Session\SessionServiceProvider::class,
Illuminate\Translation\TranslationServiceProvider::class,
Illuminate\Validation\ValidationServiceProvider::class,
Illuminate\View\ViewServiceProvider::class,
Beansoft\PractitionerIMS\PractitionerIMSServiceProvider::class,
/*
* Package Service Providers...
*/
//
Yab\Laracogs\LaracogsProvider::class,
/*
* Application Service Providers...
*/
App\Providers\AppServiceProvider::class,
App\Providers\AuthServiceProvider::class,
// App\Providers\BroadcastServiceProvider::class,
App\Providers\EventServiceProvider::class,
App\Providers\RouteServiceProvider::class,
],
Вывод php artisan route