invoiceninja/app/Http/ViewComposers/ProposalComposer.php
Hillel Coren 427c5c3721 Proposals
2018-02-04 23:50:57 +02:00

32 lines
587 B
PHP

<?php
namespace App\Http\ViewComposers;
use Illuminate\View\View;
use App\Models\ProposalSnippet;
/**
* ClientPortalHeaderComposer.php.
*
* @copyright See LICENSE file that was distributed with this source code.
*/
class ProposalComposer
{
/**
* Bind data to the view.
*
* @param View $view
*
* @return void
*/
public function compose(View $view)
{
$snippets = ProposalSnippet::scope()
->with('proposal_category')
->orderBy('name')
->get();
$view->with('snippets', $snippets);
}
}