display create button by condition

hello i want to display create button of header by condition how should i do that?

i tried to customize the function in the image but i got error, i don't know the proper way for saying this.
any help will be usefull
image.png
Solution
I would simply just add a query?
return MyModel::where('user_id', auth()->id())->count() < 1;
Was this page helpful?