Skip to content

Commit

Permalink
Merge pull request #9 from HijenHEK/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
HijenHEK committed Mar 20, 2022
2 parents 550c10c + 9d40806 commit 3dee78f
Show file tree
Hide file tree
Showing 7 changed files with 5,079 additions and 23,953 deletions.
4 changes: 3 additions & 1 deletion app/Http/Controllers/UserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ class UserController extends Controller

public function __invoke(Request $request)
{
return response()->json($request->user());
if(auth()->check()){
return response()->json(auth()->user());
}
}
}
3 changes: 0 additions & 3 deletions app/Http/Controllers/VerificationController.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,11 @@
namespace App\Http\Controllers;

use App\Models\User;
use Illuminate\Auth\Access\AuthorizationException;
use Illuminate\Foundation\Auth\VerifiesEmails;
use Illuminate\Http\Request;

class VerificationController extends Controller
{
//
use VerifiesEmails;

/**
* Mark the authenticated user's email address as verified.
Expand Down
28,996 changes: 5,062 additions & 23,934 deletions package-lock.json

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,21 @@
"production": "mix --production"
},
"devDependencies": {
"@vue/compiler-sfc": "^3.0.11",
"autoprefixer": "^10.2.5",
"axios": "^0.21",
"laravel-mix": "^6.0.0-beta.17",
"@vue/compiler-sfc": "^3.2.31",
"autoprefixer": "^10.4.4",
"axios": "^0.21.4",
"laravel-mix": "^6.0.43",
"lodash": "^4.17.19",
"postcss": "^8.2.12",
"tailwindcss": "^2.1.1",
"vue": "^3.0.11",
"vue-loader": "^16.2.0"
"postcss": "^8.4.12",
"tailwindcss": "^2.2.19",
"vue": "^3.2.31",
"vue-loader": "^16.8.3"
},
"dependencies": {
"@heroicons/vue": "^1.0.1",
"@heroicons/vue": "^1.0.6",
"moment": "^2.29.1",
"vue-router": "^4.0.6",
"vuex": "^4.0.0",
"vue-router": "^4.0.14",
"vuex": "^4.0.2",
"vuex-shared-mutations": "^1.0.2"
}
}
2 changes: 1 addition & 1 deletion resources/js/store/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ export default createStore({
await axios.get('/api/user').then((res) => {
commit('setUser', res.data);
}).catch((err) => {

throw err.response
})
},
async profile({commit},payload) {
Expand Down
2 changes: 0 additions & 2 deletions resources/views/welcome.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@

<title>Laravel</title>

<!-- Fonts -->
<link href="https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700&display=swap" rel="stylesheet">

<!-- Styles -->
<style>
Expand Down
3 changes: 2 additions & 1 deletion routes/api.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,11 @@
Route::middleware('auth:sanctum')->group(function () {
Route::patch('/profile', ProfileController::class);
Route::patch('/password', PasswordController::class);
Route::get('/user', UserController::class);

Route::post('/logout', [AuthController::class, 'logout']);

// in app verification
// Route::post('/verify-email/{id}/{hash}', [VerificationController::class, 'verify'])->name('verify');
// Route::post('/verify-resend', [VerificationController::class, 'resend']);
});
Route::get('/user', UserController::class);

0 comments on commit 3dee78f

Please sign in to comment.