flavorly / vanilla-components

A lightweight, flexible & customizable UI library for Vue 3, styled with Tailwind CSS.

Home Page:https://vanilla-components.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

auth()->id() not available on query

juliancarstairs opened this issue · comments

commented
public function query(): mixed
    {   
        return User::query()->where('id', auth()->id());
    }

Id is in auth() is null here in my controller, I wondered why and how to fix? I can pass through the id from the request, currently using auth:sanctum guard in laravel, so you have to login to see the page. So auth is there, but just not on the query.

Any help would be great. Also I think I would like to help maintain this package if that is of interest.

Interesting, i wonder why is not available there, its should be a plain class without extra stuff attached, so im wondering why its not there. If you can provide a simple repo replicating it i would be glad, also PR are really welcome :p as im moving re-working the next version of Vanilla Components ( UI bits ). Lmk if you wanna take a stab