Skip to content

Add blade directive to know if account is linked

Latest
Compare
Choose a tag to compare
@magrigry magrigry released this 30 Aug 11:48
· 2 commits to main since this release
  • add blade directive hasDiscordLinked and hasNotDiscordLinked

Examples

     @plugin('discord-auth') {{-- if plugin discord-auth is enabled --}}
           @guest  {{-- if user is not authenticated --}}
                 <a href="{{ route('discord-auth.login') }}">Connect with discord</a>
          @endguest
    @endplugin
     @plugin('discord-auth') {{-- if plugin discord-auth is enabled --}}
           @auth  {{-- if user is authenticated --}}
                @hasNotDiscordLinked {{-- if user hasn't a discord account linked --}}
                     <a href="{{ route('discord-auth.login') }}">Link your account with Discord</a>
                @endhasNotDiscordLinked
           @endauth
    @endplugin