From 923b0b581e858155262d800903a4e26bbdc9c70c Mon Sep 17 00:00:00 2001 From: weichien00 Date: Fri, 25 Jun 2021 03:16:23 +0800 Subject: [PATCH] new: add register account api route. #1 --- routes/account.php | 11 +++++++++++ routes/api.php | 5 ++--- 2 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 routes/account.php diff --git a/routes/account.php b/routes/account.php new file mode 100644 index 00000000..0aecd754 --- /dev/null +++ b/routes/account.php @@ -0,0 +1,11 @@ + 'account', 'namespace' => 'Accounts', 'as' => 'account.'], function () { + + Route::group(['prefix' => 'registration', 'as' => 'registration.'], function () { + Route::post('/registration', 'CreateCustomerController@create')->name('register'); + }); + +}); diff --git a/routes/api.php b/routes/api.php index bcb8b189..d390dc50 100644 --- a/routes/api.php +++ b/routes/api.php @@ -1,6 +1,5 @@ get('/user', function (Request $request) { - return $request->user(); +Route::group(['middleware' => 'api', 'prefix' => 'v1', 'as' => 'api.'], function () { + require __DIR__ . '/account.php'; });