Skip to content

Instantly share code, notes, and snippets.

@ChadTaljaardt
Created April 26, 2016 23:27
Show Gist options
  • Save ChadTaljaardt/982cf9c2f93559e3c27706af774925e6 to your computer and use it in GitHub Desktop.
Save ChadTaljaardt/982cf9c2f93559e3c27706af774925e6 to your computer and use it in GitHub Desktop.
<?php
namespace App\Http\ViewComposers;
use Illuminate\View\View;
use App\Models\Store\Cart as Cart;
use Auth;
use App\Categories as Categories;
use App\Models\Store\Products as Products;
class ProductsComposer
{
public function __construct()
{
}
public function compose(View $view)
{
$categories = Categories::where('enabled', '1')->get();
$view->with(['categories' => $categories]);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment