Oliver Servín

Remove the personal_access_tokens table on a fresh Laravel App

Since Laravel v8.6.0, Sanctum is now the default API authentication stack. However, initially most of my projects don't need an API, but because of the Sanctum package I end up with an extra personal_access_tokens table.

You can easily remove Sanctum by running composer remove, and commenting out or remove the api/user endpoint in your api route file.

composer remove laravel/sanctum
// routes/api.php


use Illuminate\Http\Request;
use Illuminate\Support\Facades\Route;

// Route::middleware('auth:sanctum')->get('/user', function (Request $request) {
//     return $request->user();
// });

You may also need to remove the `CreatePersonalAccessTokensTable` migration, and run the `migrate:fresh` command to drop all tables from the database and run migrate again.

rm database/migrations/2019_12_14_000001_create_personal_access_tokens_table.php

php artisan migrate:fresh

Subscribe to get by email future posts or grab the RSS feed.

Custom styling the pay button with Laravel Cashier Paddle

Embed Paddle's checkout widget with Laravel Cashier

Weekly auto-reset a Laravel demo app

Remove the personal_access_tokens table on a fresh Laravel App

Deploy Umami analytics with Launcher

Fix Laravel storage:link using Launcher

Launcher: first impressions

Integrating Tiptap in a Laravel-Livewire project

Probando Google Ads con RadioCúbito(Design)

How to run a Ghost blog on Laravel Forge