Skip to content
Snippets Groups Projects
Verified Commit f25cb186 authored by Sofiane Lasri's avatar Sofiane Lasri
Browse files

feat: add legal mentions page and update terms page with localization

- Created a new LegalMentionsController to handle the display of legal mentions.
- Added a new Blade view for legal mentions with localization support.
- Updated the terms page to use localized titles.
- Updated footer links to use localized text for legal mentions and terms.
- Added French localization entries for "Mentions légales" and "Conditions générales de vente".
parent 1de77bfa
Branches
No related tags found
1 merge request!61Resolve "Créer pages mentions légales et conditions générales de vente"
Pipeline #1064 passed
<?php
namespace App\Http\Controllers\Public;
use App\Http\Controllers\Controller;
use App\Models\LegalMention;
class LegalMentionsController extends Controller
{
public function __invoke()
{
$activeLegalMentionsText = LegalMention::where('active', true)->first();
if (! $activeLegalMentionsText) {
abort(404);
}
$activeLegalMentionsText = $activeLegalMentionsText->contentTransKey->getTranslation();
return view('public.legal-mentions', compact('activeLegalMentionsText'));
}
}
......@@ -4,4 +4,6 @@
'custom_needs' => 'Un besoin particulier ?',
'custom_needs_desc' => 'Je suis ouverte à toute proposition. N’hésitez pas à me contacter !',
'completed_in' => 'Réalisé en',
'legal_mentions' => 'Mentions légales',
'terms' => 'Conditions générales de vente',
];
......@@ -36,11 +36,12 @@
<div class="self-stretch text-2xl font-bold">Informations légales</div>
<ul class="flex flex-col gap-2">
<li>
<a href="{{ route('legal-mentions') }}" class="text-muted hover:text-primary">Mentions
légales</a>
<a href="{{ route('legal-mentions') }}"
class="text-muted hover:text-primary">{{ __('generic.legal_mentions') }}</a>
</li>
<li>
<a href="#" class="text-muted hover:text-primary">Conditions générales de vente</a>
<a href="{{ route('terms') }}"
class="text-muted hover:text-primary">{{ __('generic.terms') }}</a>
</li>
</ul>
</div>
......
@extends('layouts.public', ['title' => __('generic.legal_mentions')])
@section('content')
<x-public.navbar class="container mx-auto px-4"/>
<div class="container mx-auto px-4 py-24 flex flex-col gap-16">
<x-public.generic-page-header title="{{ __('generic.legal_mentions') }}"/>
<div>
<x-markdown class="markdown">
{{ $activeLegalMentionsText }}
</x-markdown>
</div>
</div>
<x-public.footer/>
@endsection
\ No newline at end of file
@extends('layouts.public', ['title' => "Mentions légales"])
@extends('layouts.public', ['title' => __('generic.terms')])
@section('content')
<x-public.navbar class="container mx-auto px-4"/>
<div class="container mx-auto px-4 py-24 flex flex-col gap-16">
<x-public.generic-page-header title="Mentions légales"/>
<div class="">
<x-public.generic-page-header title="{{ __('generic.terms') }}"/>
<div>
<x-markdown class="markdown">
{{ $activeTermsText }}
</x-markdown>
......
......@@ -11,6 +11,7 @@
use App\Http\Controllers\Admin\SocialMediaLinksController;
use App\Http\Controllers\Admin\TermsSectionController;
use App\Http\Controllers\Public\IndexController;
use App\Http\Controllers\Public\LegalMentionsController;
use App\Http\Controllers\Public\PortfolioController;
use App\Http\Controllers\Public\PrestationController as PublicPrestationController;
use App\Http\Controllers\Public\TermsController;
......@@ -30,7 +31,8 @@
Route::get('/portfolio/api', [PortfolioController::class, 'api'])->name('portfolio.api');
Route::get('/portfolio/{slug}', [PortfolioController::class, 'show'])->name('portfolio.show');
Route::get('/prestations/{slug}', [PublicPrestationController::class, 'index'])->name('prestations.show');
Route::get('/mentions-legales', TermsController::class)->name('legal-mentions');
Route::get('/mentions-legales', LegalMentionsController::class)->name('legal-mentions');
Route::get('/conditions-generales-de-vente', TermsController::class)->name('terms');
Route::view('/maintenance', 'public.maintenance')->name('maintenance');
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment