Files
monica/app/Http/ViewComposers/CountrySelectViewComposer.php
T
Régis Freyd a2172f0851 Add style CI (#503)
Hopefully this will result in slightly better code.
2017-07-26 21:02:55 -04:00

26 lines
431 B
PHP

<?php
namespace App\Http\ViewComposers;
use App\Country;
use Illuminate\View\View;
class CountrySelectViewComposer
{
public function __construct()
{
}
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$countries = Country::orderBy('country', 'asc')->get();
$view->with('countries', $countries);
}
}