37 lines
803 B
PHP
37 lines
803 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;
|
|
|
|
class HomeController extends Controller
|
|
{
|
|
/**
|
|
* Create a new controller instance.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function __construct()
|
|
{
|
|
// $this->middleware('auth');
|
|
}
|
|
|
|
/**
|
|
* Show the application dashboard.
|
|
*
|
|
* @return \Illuminate\Contracts\Support\Renderable
|
|
*/
|
|
public function index()
|
|
{
|
|
$data['categories'] = Categories::getTree();
|
|
$data['category'] = Categories::get(15)->toArray();
|
|
$data['articles'] = Articles::getByCategory(0)->toArray();
|
|
// dump($data);
|
|
return view('Shop.home', $data);
|
|
}
|
|
}
|