a2172f0851
Hopefully this will result in slightly better code.
26 lines
434 B
PHP
26 lines
434 B
PHP
<?php
|
|
|
|
namespace App\Http\ViewComposers;
|
|
|
|
use App\Currency;
|
|
use Illuminate\View\View;
|
|
|
|
class CurrencySelectViewComposer
|
|
{
|
|
public function __construct()
|
|
{
|
|
}
|
|
|
|
/**
|
|
* Bind data to the view.
|
|
*
|
|
* @param View $view
|
|
* @return void
|
|
*/
|
|
public function compose(View $view)
|
|
{
|
|
$currencies = Currency::orderBy('name', 'asc')->get();
|
|
$view->with('currencies', $currencies);
|
|
}
|
|
}
|