Link to the repository
[Only for premium members]
[Only for premium members]
Our users can finally log in, and we are saving their API token. So, let's start using it to make our API calls:
expo-secure-store
to store the token in the device's secure storage.Let's start this by reverting all of our Laravel code changes to the original state:
app/Http/Controllers/Api/CategoryController.php
public function store(StoreCategoryRequest $request){ $category = Category::create($request->validated()); $category = auth()->user()->categories()->create($request->validated()); return new CategoryResource($category);}
And then...