jackocnr / intl-tel-input

A JavaScript plugin for entering and validating international telephone numbers. Now includes React and Vue components.
https://intl-tel-input.com
MIT License
7.57k stars 1.94k forks source link

Laravel intégration #1083

Closed VConsulting closed 4 years ago

VConsulting commented 4 years ago

Laravel integration

Unable to add intlTelInput to the Laravel. I loaded intlTelInput via NPM

I added the require to app.js: require ('intl-tel-input / build / js / utils'); require ('intl-tel-input / build / js / intlTelInput');

and CSS in app.scss: @import "~ intl-tel-input / build / css / intlTelInput.css";

Then added a field for the input in my blade view:

and the script: ``

`` But I have the error: window.intlTelInput is not a function

What have I done wrong?

jackocnr commented 4 years ago

I have no experience with Laravel, so you'll have to remove that from the equation for me to be able to help you. If you can find the minimal set of code that reproduces the problem and put that in a CodePen, then I'd be happy to take a look. Here is an example pen with the plugin up and running - feel free to fork this if it helps.

If you need help with Laravel code specifically, then I'd recommend you ask on StackOverflow.

VConsulting commented 4 years ago

Thank you for the answer, I installed directly via the Githubissues.

  • Githubissues is a development platform for aggregating issues.