Laravel中的命名空间视图

I was referred to Juggling Larger Laravel Applications and I'm havihng trouble getting

View::addNamespace('Marketing', __DIR__.'/../Views')

to work in one of my sub-app directories where the views are located at /var/www/myapp.com/app/MyApp/Marketing/Views

Placing this code in my /var/www/myapp.com/app/MyApp/Marketing/Providers/MarketingServiceProvider.php

<?php namespace MyApp\Marketing\Providers;

use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\View;

class MarketingServiceProvider extends ServiceProvider
{
    public function register()
    {

    }

    public function boot()
    {
        require_once(__DIR__.'/../routes.php');
        View::addNamespace('Marketing', __DIR__.'/../Views');
    }
}

and referencing it in my routes file like

Route::group(array('domain' => array('www.myapp.dev')), function()
{
    return View::make('Marketing::index');
});

results in No hint path defined for [Marketing].

I've also added

MyApp\Marketing\Providers\MarketingServiceProvider

to the provider's config array.

Lastly, I'm using psr-0 in composer

"autoload": {
    "psr-0": {
        "MyApp": "app/"
    },

And I'm stupid... the problem wasn't what I thought it was…

Route::group(array('domain' => array('www.myapp.dev')), function()
{
    return View::make('Marketing::index');
});

Changing my route to that above fixes everything. I accidentally had www.myapp.dev in an additional array which was causing all of the unexpected results.

Why on earth would you try to namespace a view? Just put them in a folder called "marketing"...

Im confused too... Whats wrong with:

Route::group(array('domain' => array('www.myapp.dev')), function()
{
    return View::make('marketing.index');
});

and storing your marketing index view as: app/views/marketing/index.blade.php?