@extends('layouts.app') @section('title', 'VideoTube - Home') @section('content')
@if($featuredVideos->count() > 0)

Featured Videos

@foreach($featuredVideos as $video)

{{ $video->title }}

{{ $video->category->name }} {{ number_format($video->views) }}
@endforeach
@endif

Browse by Category

@foreach($categories as $category) {{ $category->name }} ({{ $category->approved_videos_count }}) @endforeach

Latest Videos

@foreach($videos as $video)

{{ $video->title }}

{{ $video->category->name }} {{ number_format($video->views) }}
{{ $video->created_at->diffForHumans() }}
@endforeach
{{ $videos->links() }}
@endsection