Closed tommyz4 closed 3 years ago
Try use \Manny;
instead.
Make sure you do composer install
Any error messages or anything?
Still no luck,
Ran composer require hallindavid/manny npm install npm run dev php artisan cache:clear
Still in my controller Manny class is not found,
use \Manny; use Manny;
class Patients extends Component { public $fid, $patients, $patient_id, $first_name, $last_name, $sex, $dob, $phone_number,$street_address,$city, $state, $zip_code, $middle_name; public $isOpen = 0;
// Get the currently authenticated user...
// Get the currently authenticated user's ID...
public function updated($field)
{
if ($field == 'phone_number') {
// this is where we will detect any changes to the phone field.
$this->phone_number = Manny::stripper($this->phone_number, ['phone_number']);
}
}
I don't see it added anywhere in app.php either in laravel.
It appears to have installed?
[xxx@ip-xxx-beta]$ locate Manny /beta/vendor/hallindavid/manny/src/Manny /beta/vendor/hallindavid/manny/src/Manny/Crumble.php /beta/vendor/hallindavid/manny/src/Manny/Manny.php /beta/vendor/hallindavid/manny/src/Manny/Mask.php /beta/vendor/hallindavid/manny/src/Manny/Percent.php /beta/vendor/hallindavid/manny/src/Manny/Phone.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper /beta/vendor/hallindavid/manny/src/Manny/Stripper.php /beta/vendor/hallindavid/manny/src/Manny/Yoink.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Brack10.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Brack10Ext.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Brack11.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Brack11Ext.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Dashed10.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Dashed11.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Dot10.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Dot11.php /beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Raw10.php ****/beta/vendor/hallindavid/manny/src/Manny/PhoneHelper/Raw11.php
Ok so this code here - I think you are using the stripper function incorrectly.
//Will take current phone_number value, remove all non-numeric characters, and then force into "xxx-xxx-xxxx" format
$this->phone_number = Manny::mask($this->phone_number, "111-111-1111");
// or
// this will remove all non-numeric characters from the phone number field
$this->phone_number = Manny::stripper($this->phone_number, ['num']);
What kind of format are you looking for?
is it that Manny isn't found? or is it that the function isn't found?
like - do you have an error message possibly?
I hope the above worked - if not, let me know, but for now I'm going to close the issue.
Use Manny and Use \Manny still throws an error saying Class "Manny" not found.
use Manny;
is not working, do you have any suggestions?