🗃️ Ajoute l'option d'encryption

Par défaut à true
This commit is contained in:
2019-10-08 17:15:06 +02:00
parent 407b7c2774
commit 5467c7bdb7
3 changed files with 54 additions and 0 deletions

View File

@@ -7,6 +7,7 @@ use App\PostsTag;
use App\Services\TagDetectorService;
use App\Tag;
use DateTime;
use http\Client\Curl\User;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Redirect;
@@ -32,6 +33,7 @@ class HomeController extends Controller
setlocale(LC_TIME, 'fr_FR.utf8');
$today = new DateTime();
$user_id = Auth::user()->getAuthIdentifier();
$user = \App\User::find($user_id);
$all_counts = Post::where('user_id', $user_id)->count();
$year_counts = Post::where('user_id', $user_id)->whereYear('date_post', $today->format('Y'))->count();
$month_counts = Post::where('user_id', $user_id)
@@ -50,6 +52,7 @@ class HomeController extends Controller
return view('home', [
'already' => $already,
'must_encrypt' => $user->encrypt_messages,
'all_counts' => $all_counts,
'year_counts' => $year_counts,
'month_counts' => $month_counts,