From 739925b04682dfa63ed7ca0ed5c2fa210e4a3f1a Mon Sep 17 00:00:00 2001 From: Toni Date: Fri, 24 May 2024 10:15:02 +0800 Subject: [PATCH] test --- composer.json | 6 ++++++ src/App.js | 5 ++++- src/components/RouterSwitcher.js | 3 +-- 3 files changed, 11 insertions(+), 3 deletions(-) create mode 100644 composer.json diff --git a/composer.json b/composer.json new file mode 100644 index 0000000..fb0d6f2 --- /dev/null +++ b/composer.json @@ -0,0 +1,6 @@ +{ + "require": { + "laravel/sanctum": "^4.0", + "laravel/ui": "^4.5" + } +} diff --git a/src/App.js b/src/App.js index b45f4ef..826e985 100644 --- a/src/App.js +++ b/src/App.js @@ -18,13 +18,16 @@ function App() { const getCSRF = async ()=>{ try { await http.get('/sanctum/csrf-cookie') + const res= await http.get('/api/user') + console.log(res.data); } catch (error) { console.error(error) } } return ( -
+
+ } /> { return( - {/* } /> */} {/* } /> */} } /> } />