非公開ユーザの考慮漏れ
This commit is contained in:
parent
eb1884200b
commit
efd5eab5e6
@ -36,9 +36,13 @@ class HomeController extends Controller
|
||||
|
||||
if (Auth::check()) {
|
||||
// お惣菜コーナー用のデータ取得
|
||||
$publicLinkedEjaculations = Ejaculation::where('is_private', false)
|
||||
->where('link', '<>', '')
|
||||
->orderBy('ejaculated_date', 'desc')
|
||||
$publicLinkedEjaculations = Ejaculation::join('users', 'users.id', '=', 'ejaculations.user_id')
|
||||
->where('users.is_protected', false)
|
||||
->where('ejaculations.is_private', false)
|
||||
->where('ejaculations.link', '<>', '')
|
||||
->orderBy('ejaculations.ejaculated_date', 'desc')
|
||||
->select('ejaculations.*')
|
||||
->with('user')
|
||||
->take(5)
|
||||
->get();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user