rider
201
12
Laravel

Redirection in Laravel

Posted 2 weeks ago by rider

Iam working in a project using Laravel and Angular 7, and trying to make the payment using stripe

https://example.domain.com/admin - will goes to angular 7

we are trying the payment URL like - https://payment.domain.com configured in route look like

$domain = parse_url(request()->root())['host']; 
if($domain=='payments.domain.com'){
   Route::get('/', function () {
 return 'welcome'; });

Route::get('payment/{id}', '[email protected]');
Route::post('paymentStripe', '[email protected]_payment');
Route::get('paymentFails', '[email protected]');

} else {
    remaining routes declared here
} 

if i hit http://payment.domain.com/admin it's directly going to angular(instead of https)

/admin is configured in http://example.domain.com/admin, i don't have any idea why it's directs through payment URL, can anyone please help us to solve this issue.

Please sign in or create an account to participate in this conversation.