Add legals and polices pages
This commit is contained in:
parent
8668c6a38c
commit
bd5be3fce1
5 changed files with 97 additions and 13 deletions
23
app/Http/Controllers/Fo/LegalController.php
Normal file
23
app/Http/Controllers/Fo/LegalController.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Fo;
|
||||
|
||||
use App\Enums\StaticPageType;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\StaticPage;
|
||||
|
||||
class LegalController extends Controller
|
||||
{
|
||||
/**
|
||||
* Legal show
|
||||
*
|
||||
* @param \App\Models\StaticPage $legalPage
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function show(StaticPage $legalPage)
|
||||
{
|
||||
$legalPage = StaticPage::query()->where('type', StaticPageType::legals)
|
||||
->get();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $legalPage[0]]);
|
||||
}
|
||||
}
|
||||
23
app/Http/Controllers/Fo/PolicyController.php
Normal file
23
app/Http/Controllers/Fo/PolicyController.php
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Fo;
|
||||
|
||||
use App\Enums\StaticPageType;
|
||||
use App\Http\Controllers\Controller;
|
||||
use App\Models\StaticPage;
|
||||
|
||||
class PolicyController extends Controller
|
||||
{
|
||||
/**
|
||||
* Legal show
|
||||
*
|
||||
* @param \App\Models\StaticPage $policyPage
|
||||
* @return \Illuminate\Contracts\View\View
|
||||
*/
|
||||
public function show(StaticPage $policyPage)
|
||||
{
|
||||
$policyPage = StaticPage::query()->where('type', StaticPageType::confidentiality)
|
||||
->get();
|
||||
return view('fo.pages.legals', ['staticPageModel' => $policyPage[0]]);
|
||||
}
|
||||
}
|
||||
|
|
@ -88,24 +88,32 @@
|
|||
{{ __('Contact') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-uppercase @if (request()->routeIs('CHANGEME')) active @endif" data-bs-toggle="tooltip"
|
||||
href="#" title="{{ __('Mentions légales') }}">
|
||||
{{ __('Mentions légales') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<span class="d-md-none"> - </span>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="col-12 col-lg-3 d-flex flex-column text-uppercase p-lg-3">
|
||||
<span>{{ __('Branding & Web Design :') }}</span>
|
||||
<span>{{ __('Agence-S') }}</span>
|
||||
<a class="nav-link cn-cookie-link text-uppercase mt-2 block" data-bs-toggle="tooltip" href="#"
|
||||
title="{{ __('Mentions légales') }}">
|
||||
{{ __('cookie-notice.button_customize_cookies') }}
|
||||
</a>
|
||||
<div class="col-12 col-lg-3 d-flex flex-column text-uppercase flex-lg-row justify-content-around p-lg-3">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-uppercase @if (request()->routeIs('CHANGEME')) active @endif" data-bs-toggle="tooltip"
|
||||
href="{{ route('fo.legals.show') }}" title="{{ __('Mentions légales') }}">
|
||||
{{ __('Mentions légales') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-uppercase @if (request()->routeIs('CHANGEME')) active @endif" data-bs-toggle="tooltip"
|
||||
href="{{ route('fo.policies.show') }}" title="{{ __('Charte de confidentialité') }}">
|
||||
{{ __('Charte de confidentialité') }}
|
||||
</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link text-uppercase cn-cookie-link @if (request()->routeIs('CHANGEME')) active @endif"
|
||||
data-bs-toggle="tooltip" href="#" title="{{ __('Gestion des cookies') }}">
|
||||
{{ __('cookie-notice.button_customize_cookies') }}
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
25
resources/views/fo/pages/legals.blade.php
Normal file
25
resources/views/fo/pages/legals.blade.php
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
@extends('fo.layout')
|
||||
|
||||
@section('title', __($staticPageModel->seo_title))
|
||||
@section('description', __($staticPageModel->seo_description))
|
||||
@section('breadcrumb',
|
||||
request()->route()->getName())
|
||||
|
||||
@section('content')
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col">
|
||||
<hr class="border-dark border-3 opacity-100">
|
||||
<h1 class="f-sheldon text-uppercase text-center">{{ __($staticPageModel->title) }}</h1>
|
||||
<hr class="border-dark border-3 mb-5 opacity-100">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row mb-5">
|
||||
<div class="col">
|
||||
{{ __($staticPageModel->content) }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
|
|
@ -1,6 +1,8 @@
|
|||
<?php
|
||||
|
||||
use App\Http\Controllers\Fo\HomeController;
|
||||
use App\Http\Controllers\Fo\LegalController;
|
||||
use App\Http\Controllers\Fo\PolicyController;
|
||||
use Illuminate\Support\Facades\Route;
|
||||
|
||||
Route::middleware(['throttle:credentials'])
|
||||
|
|
@ -8,4 +10,7 @@ Route::middleware(['throttle:credentials'])
|
|||
->group(function () {
|
||||
Route::get('/', [HomeController::class, 'index'])->name('homepage');
|
||||
Route::view('/bs-demo', 'fo.pages.bs-demo')->name('bs-demo');
|
||||
|
||||
Route::get('/mentions-legales', [LegalController::class, 'show'])->name('legals.show');
|
||||
Route::get('/charte-de-confidentialite', [PolicyController::class, 'show'])->name('policies.show');
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue