- Save the profile into the current request when the user is
authenticated
- Created the migration for the profiles table
- Created the Profile model
- Created route to retrieve the current user's profile
This commit is contained in:
2020-11-01 08:50:51 +00:00
parent be75e929f1
commit a7ab7f56ef
7 changed files with 235 additions and 166 deletions

View File

@@ -0,0 +1,19 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class ProfilesController extends Controller
{
public function current(Request $request)
{
$params = $request->query();
$user = $params['user'];
return response()->json([
'id' => $user['id'],
'display_name' => $user['display_name'],
'picture' => $user['picture'],
]);
}
}