V
V
Vladimir Singhtlov2017-10-09 16:45:05
Laravel
Vladimir Singhtlov, 2017-10-09 16:45:05

How to display only users with visible==true on any request?

There is a User model with the visible parameter when the user is deleted, it changes to false and this condition is added to all requests visible != false.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey Ukolov, 2017-10-09
@singhtless

https://laravel.com/docs/5.5/eloquent#global-scopes
https://laravel.com/docs/5.5/eloquent#soft-deleting

D
Dmitry Kuznetsov, 2017-10-09
@dima9595

You make a request with the condition visible == true and display this list as an option.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question