public function prepareEmailDataForInsert($request) {

        $data = [];

        $data['email_type_id'] = 1;  // Primary
        $data['title']         = $request->input('email');
        $data['description']   = "";
        $data['comments']      = "Created by front-end subscription to an email list";
        $data['created_at']    = Carbon::now();
        $data['created_by']    = $this->userRepository->getFirstAmongEqualsUserID();
        $data['updated_at']    = Carbon::now();
        $data['updated_by']    = $this->userRepository->getFirstAmongEqualsUserID();

        return $data;
    }
public function prepareEmailDataForInsert($request) {

        $data = [];

        $data['email_type_id'] = 1;  // Primary
        $data['title']         = $request->input('email');
        $data['description']   = "";
        $data['comments']      = "Created by front-end subscription to an email list";
        $data['created_at']    = Carbon::now();
        $data['created_by']    = $this->userRepository->getFirstAmongEqualsUserID();
        $data['updated_at']    = Carbon::now();
        $data['updated_by']    = $this->userRepository->getFirstAmongEqualsUserID();

        return $data;
    }
public function prepareEmailDataForInsert ( $ request ) { $ data = [ ] ; $ data [ 'email_type_id' ] = 1 ; // Primary $ data [ 'title' ] = $ request -> input ( 'email' ) ; $ data [ 'description' ] = "" ; $ data [ 'comments' ] = "Created by front-end subscription to an email list" ; $ data [ 'created_at' ] = Carbon :: now ( ) ; $ data [ 'created_by' ] = $ this -> userRepository -> getFirstAmongEqualsUserID ( ) ; $ data [ 'updated_at' ] = Carbon :: now ( ) ; $ data [ 'updated_by' ] = $ this -> userRepository -> getFirstAmongEqualsUserID ( ) ; return $ data ; }
Prepare the data for creating a new record in the "emails" db table

@param  object  $request     The request object
@return array
Prepare the data for creating a new record in the emails db table