AlbumsViewComposer   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1
Metric Value
wmc 1
lcom 0
cbo 1
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A compose() 0 5 1
1
<?php
2
3
namespace WITR\ViewComposers;
4
5
use WITR\AlbumReview;
6
use Illuminate\View\View;
7
8
class AlbumsViewComposer {
9
10
	/**
11
	 * Bind data to the view.
12
	 *
13
	 * @param  View  $view
14
	 * @return void
15
	 */
16
	public function compose(View $view)
17
	{
18
		$albums = AlbumReview::orderBy('id', 'desc')->take(2)->get();
19
		$view->with('albums', $albums);
20
	}
21
}