예제 #1
0
 public static function add($friend)
 {
     $hosts = preg_split('/\\r\\n|\\r|\\n/', $friend);
     foreach ($hosts as $entry) {
         $entry = explode('=', $entry);
         Blacklist::create(array('user_id' => Auth::user()->id, 'ip' => $entry[0], 'desc' => !empty($entry[1]) ? $entry[1] : 'none'));
     }
     return Redirect::to('/admin/blacklist/overview');
 }