Hi everyone!
I am creating a new package and save it on packagist at https://packagist.org/packages/thiagovictorino/iam
I can install thru composer with no errors, But my routes isn't working on browser. Let me explain better...
I have a route /iam that I created in the package
File: laravel-iam/routes/iam.php
Route::middleware('api')->get('/iam',function (){
return 'iam route';
});
I added it into the service provider as you can see here
File: laravel-iam/src/IAMServiceProvider.php
public function boot() {
$this->loadRoutesFrom(__DIR__ . '/../routes/iam.php');
$this->publishes([__DIR__.'/../config/iam.php' => config_path('iam.php')], 'thiagovictorino-iam');
$this->loadMigrationsFrom(__DIR__.'/../database/migrations');
}
I added this package at my project and when I run 'php antisan route:list' the result is
The route exists, but when I try to access this route on browser, it is returning 404
Am I forgetting something?
the code is available at: https://github.com/thiagovictorino/iam
If it uses the api middleware, then you need to be navigating to /api/iam.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community