I am starting to try and overide some of the outputs.. but running into problems with the docs... Bits seem to be missing like where some of the files are supposed to be.
I was wondering if anyone was willing to fill int he gaps in the docs, or was willing to reply here with a working example?
Trying to bump this..
running with a clean 1.3.7 zip.. and following the documentation to teh letter (except when teh guidance was missing!)
I set the .env to have debug true and development env
"Class 'Modules\FooBar\Providers\View' not found"
My Customer View Composer is in \modules\FooBar\Http\ViewComposers\CustomersViewComposer.php
The actual cusotmers view is simply a copy of the base customer view with no changes
I'm assuming its just bad documentation?
Ah fixed it..
for future visitors..
when you create the module - if you want to override output - you also need to add
to the top of the FooBar Service provider
I spoke too soon.. now it throws
Class Modules\FooBar\Http\ViewComposers\Customers does not exist
it does, but clearly somewhere its not being used
Make sure that the namespace of Customers file is correct.
Well I think it is. it was directly from the example.. and the View composer is in Http/ViewComposers
phew.. ok it turned out to be a typo in the boot code
Now the next challenge - how to override the output for invoice printing.. since the path for pringing invoices is '/incomes/invoices/<invoice id>/print it doesn't lend itself to the 'incomes.invoices.print'
Or not, the moment I worked out it needed to over-ride incomes.invoices.invoice it failed
code for service provider boot
class FooBarServiceProvider extends ServiceProvider
* Indicates if loading of the provider is deferred.
* @var bool
protected $defer = false;
* Boot the application events.
* @return void
public function boot()
Log::debug('in FooBar SP boot.');
and view composer (invoice.blade is simply copied from teh default at the moment)
* Bind data to the view.
* @param View $view
* @return mixed
public function compose(View $view)
// Override just the 'content' section
// Override the whole file
// Push to a stack