ldc-mesbr-app/app/Traits/ThanksTrait.php

27 lines
568 B
PHP
Raw Permalink Normal View History

2019-02-13 16:37:14 +01:00
<?php
namespace App\Traits;
use Illuminate\Http\Request;
2021-04-27 17:29:47 +02:00
trait ThanksTrait
{
2019-02-13 16:37:14 +01:00
public function getThanks(Request $request)
{
2021-04-27 17:29:47 +02:00
if ($request->session()->has('campagne')) {
$campagne = $request->session()->get('campagne');
}
2019-02-13 16:37:14 +01:00
2021-04-27 17:29:47 +02:00
if ($request->session()->has('contact')) {
$contact = $request->session()->get('contact');
}
2019-02-13 16:37:14 +01:00
$ref = $campagne->camp_id;
$view = view('landings::' . $ref . '.merci')
2021-04-27 17:29:47 +02:00
->with(['ref' => $ref, 'contact' => $contact]);
2019-02-13 16:37:14 +01:00
echo($view);
}
2021-04-27 17:29:47 +02:00
}