Reputation: 143
I'm using Laravel 9, and when I click the button, I want it to save the values on the phone. I'm using 'jeroendesloovere/vcard' for this but when i call my function i get such error:
Class 'JeroenDesloovere\VCard\VCard' not found
Where am I missing? Where is my fault?
Controller:
use JeroenDesloovere\VCard\VCard;
public function vcards($name,$phone){
$vcard = new VCard();
// define variables
$lastname = 'Desloovere';
$firstname = 'Jeroen';
$additional = '';
$prefix = '';
$suffix = '';
// add personal data
$vcard->addName($lastname, $firstname, $additional, $prefix, $suffix);
}
Blade.php
<a href="#" onclick="{{HomeController::vcards($userData->full_name,$userData->masked_phone_number)}}" class="btn btn-info">add</a>
Upvotes: 0
Views: 801
Reputation: 331
The package is not installed You can install it using
composer require jeroendesloovere/vcard
Upvotes: 1