DeveloperBreeze

Sanctum Development Tutorials, Guides & Insights

Unlock 1+ expert-curated sanctum tutorials, real-world code snippets, and modern dev strategies. From fundamentals to advanced topics, boost your sanctum skills on DeveloperBreeze.

Creating Personal Access Tokens for a Custom Model in Laravel

Tutorial October 24, 2024

  • We loop through the $customers collection, displaying each customer's name and their associated tokens.
  • If the customer has any tokens, we display the token name and the abilities assigned to that token.
  • If the customer does not have any tokens, a message is shown indicating that no tokens are available.

You may want to revoke tokens when a customer logs out or when you need to invalidate a token. This can be done by deleting the token associated with the customer: