ldc-legaulois/app/Http/Controllers/BrandController.php

23 lines
532 B
PHP
Raw Normal View History

2021-02-18 16:05:57 +01:00
<?php
namespace App\Http\Controllers;
use App\Models\Ads;
2021-04-08 20:06:14 +02:00
use App\Models\OCBBreeder;
2021-02-18 16:05:57 +01:00
class BrandController extends Controller
{
2021-02-22 14:44:10 +01:00
public function index()
{
2021-04-08 20:06:14 +02:00
$breeder = OCBBreeder::where('status', true)
2021-02-22 14:44:10 +01:00
->where('picture', '!=', '')->inRandomOrder()->first();
return view('front.brand.index', compact('breeder'));
}
2021-02-18 16:05:57 +01:00
public function ads()
{
$ads = Ads::where('status', true)->orderBy('created_at', 'DESC')->get();
return view('front.brand.ads', compact('ads'));
}
}