30 lines
742 B
PHP
30 lines
742 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Shop;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Http\Controllers\Controller;
|
|
|
|
use App\Repositories\Shop\Articles;
|
|
use App\Repositories\Shop\Categories;
|
|
use App\Repositories\Shop\Offers;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
// $this->middleware('auth');
|
|
}
|
|
|
|
public function index()
|
|
{
|
|
$data = self::init();
|
|
// $data['offers'] = Offers::getLast()->toArray();
|
|
$data['articles'] = Articles::getArticlesWithOffers()->toArray();
|
|
// $data['prices'] = $data['articles']['offers'][0]['tariff']['price_lists'][0]['price_list_values'][0];
|
|
dump($data);
|
|
exit;
|
|
return view('Shop.home', $data);
|
|
}
|
|
}
|