Exemplo n.º 1
0
 public static function notify($despoId, $coolId)
 {
     $despoNotification = new Notifications();
     $coolNotification = new Notifications();
     $despoNotification->valentineId = $despoId;
     $coolNotification->valentineId = $coolId;
     $despo = Valentine::find($despoId);
     $cool = Valentine::find($coolId);
     $despoNotification->coolId = $coolId;
     $coolNotification->coolId = $despoId;
     $despoNotification->name = $cool->name;
     $coolNotification->name = $despo->name;
     $despoNotification->save();
     $coolNotification->save();
     Mail::send('emails.match', ['id' => $cool->id], function ($message) use($despo, $cool) {
         $message->to($despo->email, $despo->name)->subject($cool->name . 'Likes You too');
     });
     Mail::send('emails.match', ['id' => $despo->id], function ($message) use($cool, $despo) {
         $message->to($cool->email, $cool->name)->subject($despo->name . 'Likes You too');
     });
 }
Exemplo n.º 2
0
 public static function getExistingUser($Id)
 {
     return Valentine::where('userId', $Id)->first();
 }
Exemplo n.º 3
0
 public function search(Request $request)
 {
     $cool = Valentine::searchProfile($request->input('college'), $request->cookie('shy_first_sex'), $request->input('offset'))->toJson();
     return $cool;
 }