I am debating whether I should use Laravel to build an online store.
Requirement - Show a shopping cart in sidebar with product listing in main area. i need to bind
Make a composers.php file in your app/ directory and include it via app/start/global.php. In this file, do the View::composer calls (you do not need to put them inside App::before).
Move the composer classes into a new app/composers/ directory and add the directory to the autoloader in your composer.json.
Other than that, your use of composers is correct.
for me create a abstract class ShopController extends BaseController
and in constructor() write View::composer
and you can use DB::table('products')->remember(100)->get(); vs all() for the cache
You can simply do
@include('partials.products', array('data'=>'here'))