tissue/app/Http/Controllers/TimelineController.php

26 lines
723 B
PHP
Raw Normal View History

<?php
namespace App\Http\Controllers;
use App\Ejaculation;
use Illuminate\Http\Request;
class TimelineController extends Controller
{
public function showPublic()
{
$ejaculations = 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', 'tags')
2019-04-05 23:10:26 +09:00
->withLikes()
->onlyWebCheckin()
->paginate(21);
return view('timeline.public')->with(compact('ejaculations'));
}
}