I made a filter for Laravel 5.0 , you can redirect non-www URLs to www URL and you don't need to write any difficult htaccess codes . Just put the filter in routes.php and use it for any Routes you want them to be with WWW .
This snipped code is made by www.larabook.ir