Merge branch 'develop' into trunk
This commit is contained in:
commit
6f0348a6ff
13 changed files with 20 additions and 23 deletions
|
|
@ -32,7 +32,7 @@ class LogoController extends Controller
|
|||
$logoModels = Logo::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$logoModels,
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@ class NewsController extends Controller
|
|||
$newsModels = News::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$newsModels,
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ class SectionController extends Controller
|
|||
}
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$query,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class SiteController extends Controller
|
|||
$siteModels = Site::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$siteModels,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class SlideController extends Controller
|
|||
$slideModels = Slide::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$slideModels,
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ class StaticPageController extends Controller
|
|||
$query = StaticPage::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$query,
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ class StripController extends Controller
|
|||
$stripModels = Strip::query()->with('news');
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$stripModels,
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ class TestimonialController extends Controller
|
|||
$testimonialModels = Testimonial::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$testimonialModels,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class UserController extends Controller
|
|||
$userModels = User::query();
|
||||
|
||||
/** @var string $search Search field */
|
||||
$search = $request->search;
|
||||
$search = $request->input('search');
|
||||
if ($search) {
|
||||
$this->searchQuery(
|
||||
$userModels,
|
||||
|
|
|
|||
|
|
@ -27,7 +27,6 @@ class NewsController extends Controller
|
|||
->fragment('corpo');
|
||||
$lifeSection = $sectionModels->where('section', PageSectionEnum::move_life)->first();
|
||||
$commitmentSection = $sectionModels->where('section', PageSectionEnum::move_commitments)->first();
|
||||
|
||||
return view('fo.pages.news.index', \compact(
|
||||
'staticPageModel',
|
||||
'sectionModels',
|
||||
|
|
@ -46,10 +45,7 @@ class NewsController extends Controller
|
|||
public function show(News $news): \Illuminate\Contracts\View\View
|
||||
{
|
||||
// Get only id from published news.
|
||||
// @phpcs:disabled
|
||||
// @phpstan-ignore-next-line
|
||||
$publishedNews = News::query()->where('published', true)->orderBy('publish_at', 'DESC')->get()->pluck('id');
|
||||
// @phpcs:enable
|
||||
// Search the position of the current news id.
|
||||
$positionId = \array_search($news->id, $publishedNews->toArray());
|
||||
// Check if it's the last position.
|
||||
|
|
|
|||
|
|
@ -43,20 +43,20 @@ class ListenFormRequest extends FormRequest
|
|||
'phone' => [
|
||||
'present',
|
||||
'nullable',
|
||||
!is_null(request()->country) ?
|
||||
(Country::make(request()->country)->value === Country::france->value ?
|
||||
!is_null(request()->input('country')) ?
|
||||
(Country::make(request()->input('country'))->value === Country::france->value ?
|
||||
'phone:FR|max:25' :
|
||||
'number|max:50') :
|
||||
'number|max:50'
|
||||
'numeric|max:50') :
|
||||
'numeric|max:50'
|
||||
],
|
||||
'postal_code' => [
|
||||
'present',
|
||||
'nullable',
|
||||
!is_null(request()->country) ?
|
||||
(Country::make(request()->country)->value === Country::france->value ?
|
||||
!is_null(request()->input('country')) ?
|
||||
(Country::make(request()->input('country'))->value === Country::france->value ?
|
||||
'postal_code:FR|max:25' :
|
||||
'number|max:50') :
|
||||
'number|max:50'
|
||||
'numeric|max:50') :
|
||||
'numeric|max:50'
|
||||
],
|
||||
'city' => 'present|nullable|string|between:3,20',
|
||||
'country' => ['present', 'nullable', new Enum(Country::class)],
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
|
||||
<div class="card bg-primary rounded-4 h-100 w-100 p-3 text-white">
|
||||
<img class="card-img-top rounded-top-3" src="{{ asset($news->thumbnail) }}" title="{{ $news->thumbnail_title }}"
|
||||
alt="{{ $news->thumbnail_alt }}">
|
||||
<div class="card-body d-flex flex-column align-items-center">
|
||||
<p class="card-date small fw-bold text-quad">
|
||||
{{ str($news->publish_at->locale('fr_FR')->isoFormat('D MMMM Y'))->upper() }}
|
||||
{{ str($news->displayed_date->locale('fr_FR')->isoFormat('D MMMM Y'))->upper() }}
|
||||
</p>
|
||||
<p class="card-title fw-bold text-center">
|
||||
{{ $news->title }}
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@
|
|||
<div class="card master-card border-0 p-0">
|
||||
<div class="card-header border-0 bg-transparent">
|
||||
<div class="col-12 text-center">
|
||||
<p class="text-sixt fw-bolder mb-0 mt-3">{{ str($news->publish_at->locale('fr_FR')->isoFormat('D MMMM Y'))->upper() }}
|
||||
<p class="text-sixt fw-bolder mb-0 mt-3">{{ str($news->displayed_date->locale('fr_FR')->isoFormat('D MMMM Y'))->upper() }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue