-
app/Http/Controllers/Guest/TagController.php
Open in GitHubuse App\Http\Controllers\Controller; use App\Models\Tag; use Illuminate\Contracts\View\View; use Illuminate\Http\Request; class TagController extends Controller { public function index(Request $request): View { $tags = Tag::publicOnly() ->withCount('links') ->orderBy( $request->input('orderBy', 'name'), $request->input('orderDir', 'asc') ) ->paginate(getPaginationLimit()); return view('guest.tags.index', [ 'tags' => $tags, 'route' => $request->getBaseUrl(), 'orderBy' => $request->input('orderBy', 'name'), 'orderDir' => $request->input('orderDir', 'asc'), ]); } // }
-
app/Helper/functions.php
Open in GitHub// function getPaginationLimit() { $default = config('linkace.default.pagination'); if (request()->is('guest/*')) { return systemsettings('guest_listitem_count') ?: $default; } return usersettings('listitem_count') ?: $default; } //