How to get specific data from a functions parameters in php laravel 4 -


i working on system send specific emails different peoples email addresses (using existing code colleague of mine). unique bits of these email addresses sent parameters of send function (e.g thisbitisunique@something.com). using laravel platform i'm trying extract information attach string prefix , send on way. heres code

        private function sendgeneralmanageremail($data)         {                     // want extract park name $data           $data['parkname'] = $data->$parkname;                   // , add prefix , use mail           $emailprefix = $data."@something.com";              mail::send('emails.generalmanager', $data, function($message)             {                 $message->to($emailprefix, 'general managers')->subject('[urgent] health & safety reports');         });      }   

so question how extract specific information parameters using laravel framework. im newbee when comes php , laravel. simple suggestion on specific reading grand.

regards mike

you need add 'use' closure

    private function sendgeneralmanageremail($data)     {             // want extract park name $data             $data['parkname'] = $data->$parkname;             // , add prefix , use mail             $emailprefix = $data . "@something.com";              mail::send('emails.generalmanager', $data, function($message) use ($emailprefix) {                     $message->to($emailprefix, 'general managers')->subject('[urgent] health & safety reports');             });     } 

then can use substr need


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

How to get multiresult with multicondition in Sql Server -