<?php
namespace App\Articles;
use App\Articles\Models\Article;
use Illuminate\View\View;
class ArticleComposer
{
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$articles = Article::where('active', 1)
->where('show_on_home', 1)
->with('translation', 'headingImage')
->has('translation')
->get();
$view->with('sliderArticles', $articles);
}
}