public function show($token) {


        $files = UploadResource::collection(Upload::where('token', $token)->get());
        //$files[0]->name = 'aquino';
        if ($files->count() > 0) {

            //dd($files->resource[0]->resource);
            //print_r($files->resource[0]->resource);die();
            //print_r($files);die();
            // create a temporary placeholder for the found files with the token and give it a unituq key with expiration date.
            // add  days from now
            // /https://www.digitalocean.com/community/tutorials/easier-datetime-in-laravel-and-php-with-carbon#manipulating-the-date-and-time
            $current = Carbon::now();
            $Expires = $current->addDays(5);

            // append to lavarel json api output
            foreach($files as $i=>$file){
                //https://www.codexworld.com/how-to/generate-unique-and-secure-api-keys-with-php/
                $secretKey = bin2hex(random_bytes(32));
                $files[$i]->secret = $secretKey;
                //print_r($file->resource->attributes);


                $key = Download::create([
                    // COLUMN NAMES AND VALUES
                    'file_id' => 1,
                    'secret_key' => $secretKey,
                    'expires' => $Expires,
                ]);

            }