Jump to content

DaTransportGuru

Veteran Driver VI
 TruckersMP Profile
  • Posts

    1
  • Joined

  • Last visited

About DaTransportGuru

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

DaTransportGuru's Achievements

1

Reputation

  1. Hi, I was unable to post this in the developer section, so hopefully someone can move it to the right place. I am trying to use the Truckers MP PHP API package with Laravel. I have the following code to get the servers and cache them: $servers = Cache::remember('servers', 10, function () { if (Cache::has('servers')) { return Cache::get('servers'); } else { $client = new Client(); return $client->servers()->get(); } }); return view('layouts.servers', ['servers' => $servers]); I don't think it is working correctly because it seems to refresh quicker than the cache duration (10 minutes). Not sure what's missing or wrong. Any help would be appreciated.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.