1
0
mirror of https://github.com/BookStackApp/BookStack.git synced 2025-07-24 07:42:07 +03:00
Files
.github
app
Actions
Api
Auth
Config
Console
Entities
Exceptions
Facades
Http
Controllers
Api
Auth
Images
AttachmentController.php
AuditLogController.php
BookController.php
BookExportController.php
BookSortController.php
BookshelfController.php
ChapterController.php
ChapterExportController.php
CommentController.php
Controller.php
FavouriteController.php
HomeController.php
MaintenanceController.php
PageController.php
PageExportController.php
PageRevisionController.php
PageTemplateController.php
RecycleBinController.php
RoleController.php
SearchController.php
SettingController.php
StatusController.php
TagController.php
UserApiTokenController.php
UserController.php
UserProfileController.php
UserSearchController.php
Middleware
Requests
Kernel.php
Request.php
Interfaces
Notifications
Providers
Settings
Theming
Traits
Translation
Uploads
Util
Application.php
Model.php
helpers.php
bootstrap
database
dev
public
resources
routes
storage
tests
themes
.env.example
.env.example.complete
.gitattributes
.gitignore
LICENSE
artisan
composer.json
composer.lock
crowdin.yml
docker-compose.yml
package-lock.json
package.json
phpstan.neon.dist
phpunit.xml
readme.md
server.php
version
bookstack/app/Http/Controllers/UserProfileController.php
2021-06-26 15:23:15 +00:00

28 lines
693 B
PHP

<?php
namespace BookStack\Http\Controllers;
use BookStack\Auth\UserRepo;
class UserProfileController extends Controller
{
/**
* Show the user profile page.
*/
public function show(UserRepo $repo, string $slug)
{
$user = $repo->getBySlug($slug);
$userActivity = $repo->getActivity($user);
$recentlyCreated = $repo->getRecentlyCreated($user, 5);
$assetCounts = $repo->getAssetCounts($user);
return view('users.profile', [
'user' => $user,
'activity' => $userActivity,
'recentlyCreated' => $recentlyCreated,
'assetCounts' => $assetCounts,
]);
}
}