Opa friend, as your doubt is very comprehensive I believe you want to just a way to go, so here are some tips:
When registering students and schools, a hash should be generated, logically this hash should be unique, because as it will be serialized (sent by email), it should be sha1 and not Encrypt ex:
sha1($request->input('id_escola') . $request->input('email'). config(''));
Next you should create a notification structure look at the documentation of the Laravel
php artisan make:notification NotificacaoAluno
Register in the Trap mail to test the upload
.env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.mailtrap.io
MAIL_PORT=2525
MAIL_USERNAME=null
MAIL_PASSWORD=null
MAIL_ENCRYPTION=null
In control the sending method would look something like this:
foreach($alunos as $aluno)
Notification::route('mail', $aluno->email)->notify(new NotificacaoAluno($aluno));
A to close the cycle need to create the published route that will receive these tokens:
Route::get('/provas/{tokenescola}/{tokenaluno}', 'AtividadeController@mostraProvas');
Att
Hard to deizer without knowing what you have already done. Manages to elaborate a [mcve]?
– Woss