I’m using Laravel 11 and the latest bootstrap version to create a button and also Google Project Idx as my code editor. I got 127.0.0.1 error message when I click the button which is linking to a route as follows:
<a class="btn btn-primary btn-sm" href="{{ route('iku.create') }}" role="button">Tambah IKU</a>
when I hover the button it shows the url “127.0.0.1:9002/iku/create”. It shows correct route/folder & file but the server port is 9002 instead of the default port which is 8000. I don’t know if this is the problem.
this is my Controller code:
<?php
namespace AppHttpControllers;
use AppModelsIku;
use IlluminateHttpRedirectResponse;
use IlluminateHttpRequest;
use IlluminateViewView;
class ikucontroller extends Controller
{
public function create() : View {
return view('iku.create');
}
}
and this is inside the Routing web.php
<?php
use IlluminateSupportFacadesRoute;
//route resource for iku-iku
Route::resource('/iku', AppHttpControllersikucontroller::class);
I also run php artisan serve.
I’ve been searching for the solution on the internet but unfortunately, I didn’t find anything yet.
4