<?php
/**
* Holds the friends section controller.
*
* @package Sakura
*/
namespace Sakura\Controllers\Settings;
use Sakura\ActiveUser;
use Sakura\Perms\Site;
* Friends settings.
* @author Julian van de Groep <me@flash.moe>
class FriendsController extends Controller
{
public function listing()
// Check permission
if (!ActiveUser::$user->permission(Site::MANAGE_FRIENDS)) {
$message = "You aren't allowed to manage friends.";
$redirect = route('settings.index');
return view('global/information', compact('message', 'redirect'));
}
return view('settings/friends/listing');
public function requests()
return view('settings/friends/requests');