app/Http/Controllers/MessageController.php
/**
     * Display to all list of the resource.
     *
     * @return \Illuminate\Http\Response
     */
Display to all list of the resource.
@return \Illuminate\Http\Response
Display to all list of the resource . @return \ Illuminate \ Http \ Response
public function sendsmstoalluser()
    {
        $msgsub = Message::where('sms_type','Rates')->pluck('message');
        $msg = str_replace('\r\n', "\r\n", $msgsub);
        $msg= str_replace (array('"','"','[', ']'), '' ,  $msg);
        $user=User::All()->pluck('contact_no')->take(5);
      $notification = Message::where('sms_type','Offers')->pluck('message');
       $notification = str_replace (array('"','"','[', ']'), '' , $notification);
        return view('admin.message.sendsmstoalluser')->with('msg',$msg)->with('user',$user)->with('notification',$notification);
    }
public function sendsmstoalluser ( ) { $ msgsub = Message :: where ( 'sms_type' , 'Rates' ) -> pluck ( 'message' ) ; $ msg = str_replace ( '\r\n' , " \r \n " , $ msgsub ) ; $ msg = str_replace ( array ( '"' , '"' , '[' , ']' ) , '' , $ msg ) ; $ user = User :: All ( ) -> pluck ( 'contact_no' ) -> take ( 5 ) ; $ notification = Message :: where ( 'sms_type' , 'Offers' ) -> pluck ( 'message' ) ; $ notification = str_replace ( array ( '"' , '"' , '[' , ']' ) , '' , $ notification ) ; return view ( 'admin.message.sendsmstoalluser' ) -> with ( 'msg' , $ msg ) -> with ( 'user' , $ user ) -> with ( 'notification' , $ notification ) ; }
Display to all list of the resource.
Display to all list of the resource .