Merge branch 'issue-168' into 'le-gaulois-2024'
fix: 🐛 display correctly the jobs slider in recruitment.blade
See merge request ldc-web/projets/le-gaulois!139
This commit is contained in:
commit
4b62e14c46
3 changed files with 7 additions and 6 deletions
|
|
@ -94,7 +94,7 @@ class StaticPageController extends Controller
|
|||
config('services.digital_recruiter.url'),
|
||||
fn() => Offer::query()->where('published', true)->orderBy('publish_at', 'DESC')->take(6)->get()
|
||||
);
|
||||
$professionModels = Profession::get5Published();
|
||||
$professionModels = Profession::getRandomPublished();
|
||||
$brandAdvantageModels = BrandAdvantage::getPublishedOrdered();
|
||||
$newsCorporateModels = NewsCorporate::get9PublishedOrderedByUpdatedAt();
|
||||
if ($detect->isMobile()) {
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ class Profession extends Model
|
|||
private static function resetCache()
|
||||
{
|
||||
Cache::forget('5publishedProfessions');
|
||||
self::get5Published();
|
||||
self::getRandomPublished();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -93,10 +93,10 @@ class Profession extends Model
|
|||
*
|
||||
* @return \Illuminate\Database\Eloquent\Collection
|
||||
*/
|
||||
public static function get5Published(): \Illuminate\Database\Eloquent\Collection
|
||||
public static function getRandomPublished(): \Illuminate\Database\Eloquent\Collection
|
||||
{
|
||||
return Cache::rememberForever('5publishedProfessions', function () {
|
||||
return self::query()->where('published', true)->take(5)->get();
|
||||
return self::query()->where('published', true)->inRandomOrder()->get();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -203,8 +203,9 @@ document.addEventListener("DOMContentLoaded", function () {
|
|||
},
|
||||
992: {
|
||||
slidesPerView: 3,
|
||||
initialSlide: 1,
|
||||
slidesPerGroup: 3
|
||||
initialSlide: 2,
|
||||
slidesPerGroup: 3,
|
||||
centeredSlides: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue