Closed solimansamy closed 6 years ago
Frontend Features
Each user should have a unique download link for each format, I'm taking here about Trainer Kit
and Student Guide
.
Training Manager and Instructor can purchase the following -- Student Guide -- Trainer Kit -- Audible
Student can purchase the following -- Student Guide -- Audible
Only subscribers can download materials if they paid for it
Technical Approach
subscriber
https://github.com/camelcasetechsd/skillsbuilder/issues/27.public static function encrypt($text)
{
return str_replace(array('+', '/'), array('-', '_'), base64_encode(openssl_encrypt($text, WWW-DDD-WWW, any-number-of-random-characters, true, any-number-of-random-characters)));
}
public static function decrypt($text)
{
return openssl_decrypt(base64_decode(str_replace(array('-', '_'), array('+', '/'), $text)), 'WWW-DDD-WWW', 'any-number-of-random-characters', true, 'any-number-of-random-characters');
}
encrypt
method and into download action decrypt the parameter sent by GET method using decrypt
method.@badr4php for any additional queries to be run please create new migration file in db/migrations
Related to #25