<?php namespace App\Libs\Composers;

use CodeEmbed;

class HeadComposer
{

    public function compose($view)
    {
        $embeds = CodeEmbed::full()
            ->where('status', 'published')
            ->where('global', true)
            ->orderBy('position', 'asc')
            ->get();

        $view->with(array(
            'embeds' => $embeds
        ));
    }
}
