jeudi 26 avril 2018

How to display the details based on particular client by passing session variable in laravel using whmcs api

From the below code I need to display the domainname and regdate based on the particular client. Suggest me how to get this by using session variable in laravel.

@foreach($domain['domains']['domain'] as $product)

      

      
@endforeach

From the below json data I need to get domainname and date based on "id" using session variable.

"domains": {
"domain": [
  {
    "id": "1",
    "userid": "8",
    "orderid": "3",
    "regtype": "Register",
    "domainname": "sfsdfsdfdsfds.com",
    "registrar": "",
    "regperiod": "1",
    "firstpaymentamount": "0.00",
    "recurringamount": "740.43",
    "paymentmethod": "razorpay",
    "paymentmethodname": "Razorpay",
    "regdate": "2018-03-18",
    "expirydate": "0000-00-00",
    "nextduedate": "2018-03-18",
    "status": "Cancelled",
    "subscriptionid": "",
    "promoid": "0",
    "dnsmanagement": "0",
    "emailforwarding": "0",
    "idprotection": "0",
    "donotrenew": "0",
    "notes": ""
  },

Find below the controller code:

class InvoiceTicketController extends Controller
{  
    public function get(){
    $domain=Whmcs::GetClientsDomains([]);
    return view('clientlayout.main.mydomains',compact('domain'));
}

}

Route code is given below:

Route::get('/mydomains','InvoiceTicketController@get');



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire