-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
applied new route macros and structure
- Loading branch information
1 parent
cfc8e86
commit 49671f6
Showing
4 changed files
with
34 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,14 @@ | ||
<?php | ||
|
||
Route::group([ | ||
'prefix' => '{company_id}/portal', | ||
'middleware' => 'guest', | ||
'namespace' => 'Modules\PaypalStandard\Http\Controllers' | ||
], function () { | ||
Route::post('invoices/{invoice}/paypal-standard/return', 'Payment@return')->name('portal.invoices.paypal-standard.return'); | ||
Route::post('invoices/{invoice}/paypal-standard/complete', 'Payment@complete')->name('portal.invoices.paypal-standard.complete'); | ||
}); | ||
use Illuminate\Support\Facades\Route; | ||
|
||
/** | ||
* 'guest' middleware and 'portal/paypal-standard' prefix applied to all routes (including names) | ||
* | ||
* @see \App\Providers\Route::register | ||
*/ | ||
|
||
Route::portal('paypal-standard', function () { | ||
Route::get('invoices/{invoice}/complete', 'Payment@return')->name('invoices.return'); | ||
Route::post('invoices/{invoice}/complete', 'Payment@complete')->name('invoices.complete'); | ||
}, ['middleware' => 'guest']); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<?php | ||
|
||
Route::group([ | ||
'prefix' => '{company_id}/portal', | ||
'middleware' => 'portal', | ||
'namespace' => 'Modules\PaypalStandard\Http\Controllers' | ||
], function () { | ||
Route::get('invoices/{invoice}/paypal-standard', 'Payment@show')->name('portal.invoices.paypal-standard.show'); | ||
use Illuminate\Support\Facades\Route; | ||
|
||
/** | ||
* 'portal' middleware and 'portal/paypal-standard' prefix applied to all routes (including names) | ||
* | ||
* @see \App\Providers\Route::register | ||
*/ | ||
|
||
Route::portal('paypal-standard', function () { | ||
Route::get('invoices/{invoice}', 'Payment@show')->name('invoices.show'); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,13 @@ | ||
<?php | ||
|
||
Route::group([ | ||
'prefix' => '{company_id}/signed', | ||
'middleware' => 'signed', | ||
'namespace' => 'Modules\PaypalStandard\Http\Controllers' | ||
], function () { | ||
Route::get('invoices/{invoice}/paypal-standard', 'Payment@show')->name('signed.invoices.paypal-standard.show'); | ||
use Illuminate\Support\Facades\Route; | ||
|
||
/** | ||
* 'signed' middleware and 'signed/paypal-standard' prefix applied to all routes (including names) | ||
* | ||
* @see \App\Providers\Route::register | ||
*/ | ||
|
||
Route::signed('paypal-standard', function () { | ||
Route::get('invoices/{invoice}', 'Payment@show')->name('invoices.show'); | ||
}); |