. Licensed under the GNU Affero General Public License v3.0. // See the LICENCE file in the repository root for full licence text. namespace App\Jobs; use App\Models\User; use Illuminate\Bus\Queueable; use Illuminate\Contracts\Queue\ShouldQueue; use Illuminate\Queue\InteractsWithQueue; class UpdateUserMappingFollowerCountCache implements ShouldQueue { use InteractsWithQueue, Queueable; protected $userId; /** * Create a new job instance. * * @return void */ public function __construct($userId) { $this->userId = $userId; } /** * Execute the job. * * @return void */ public function handle() { User::find($this->userId)->cacheMappingFollowerCount(); } }