예제 #1
0
 public static function boot()
 {
     parent::boot();
     $missionMailQueuer = new MissionMailQueue();
     Mission::created(function ($mission) use($missionMailQueuer) {
         // Add emails to queue
         $missionMailQueuer->newMission($mission);
         // Add to RSS
         // Tweet about it
     });
     Mission::updating(function ($mission) use($missionMailQueuer) {
         // If  the launch date time has changed
         /*if ($) {
                         // Send out a new email
                         $missionMailQueuer->LaunchChange($mission);
         
                         // Add to RSS
         
                         // Tweet about it
                     }*/
     });
 }