public function viewUser($hash, $mode = 'default')
 {
     $user = User::where('public_hash', '=', $hash)->firstOrFail();
     $subscribers = Sub::where('sub_fp', '=', $user->user_fp)->count();
     return View::make('board.user', ['mode' => $mode, 'user' => $user, 'subscribers' => $subscribers, 'posts' => Post::user($user, $mode)]);
 }
Exemple #2
0
 public static function unsubscribe($hash, $user_fp)
 {
     $user = User::where('public_hash', '=', $hash)->firstOrFail();
     Sub::where('sub_fp', '=', $user->user_fp)->where('user_fp', '=', $user_fp)->delete();
     return true;
 }