Laravel 5: link to php page

I have two pages login.blade.php

and register.blade.php

. On mine login.blade.php

I have a link to the register.blade.php

following:

<a href="register.php">Register a new membership</a>

      

When I click the link to register.php it throws the following error:

NotFoundHttpException in RouteCollection.php line 143:

Both logins and registrations are in the same folder.

My route.php file has:

Route::get('/register', function(){
    return view('register');
});

      

+3


source to share


1 answer


Two things must happen:

1) Remove the .php in your tag. It should be like this:

<a href="register">Register a new membership</a>

      



2) Make sure you are catching the registration route correctly:

Route::get('register', function()
{
    return view('register');
});

      

+7


source







All Articles