Upgrade Guides
Upgrading from v4 to v5

Update the following dependencies in composer.json

  • jakyeru/larascord to ^5.0

Run the composer update command

composer update

Publish and run the migrations

php artisan vendor:publish --provider="Jakyeru\Larascord\LarascordServiceProvider" --tag="migrations"
php artisan migrate

Publish the config file

php artisan larascord:publish --force

Add the InteractsWithDiscord trait to your User model

app/Models/User.php
namespace App\Models;
 
use Illuminate\Database\Eloquent\Factories\HasFactory;U
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
use Laravel\Sanctum\HasApiTokens;
use Jakyeru\Larascord\Traits\InteractsWithDiscord;
 
 
class User extends Authenticatable
{
    use HasApiTokens, HasFactory, Notifiable, InteractsWithDiscord;
}

Remove the refresh_token from the User model's $fillable and $hidden arrays

Make sure the following values are in your $fillable array and are casted to the correct type

AttributeCast
idinteger
usernamestring
global_namestring
discriminatorstring
emailstring
avatarstring
verifiedboolean
bannerstring
banner_colorstring
accent_colorstring
localestring
mfa_enabledboolean
premium_typeinteger
public_flagsinteger
rolesarray

Update your resources/views/layouts/navigation.blade.php to match the one in the latest version (opens in a new tab)