Files
UNIT3D-Community-Edition/app/Http/Controllers/MediaHub/HomeController.php
HDVinnie e5a4a16ddf refactor: meta data system
- Complete rewrite of meta data system
- New media hub feature.
- Torrent Bumping Refactor
- Wish System Disabled until refactored
- Fetch meta command added for fetchinng new meta on prexsisnting torrents.
- plus alot more
- closes #1428
- closes #1344
- closes #1147
- closes #361
2020-10-28 16:42:22 -04:00

51 lines
1.3 KiB
PHP

<?php
/**
* NOTICE OF LICENSE
*
* UNIT3D is open-sourced software licensed under the GNU General Public License v3.0
* The details is bundled with this project in the file LICENSE.txt.
*
* @project UNIT3D
* @license https://www.gnu.org/licenses/agpl-3.0.en.html/ GNU Affero General Public License v3.0
* @author HDVinnie
*/
namespace App\Http\Controllers\MediaHub;
use App\Models\Person;
use App\Models\Company;
use App\Models\Collection;
use App\Models\Genre;
use App\Models\Movie;
use App\Models\Network;
use App\Http\Controllers\Controller;
use App\Models\Tv;
class HomeController extends Controller
{
/**
* Display Media Hubs.
*
* @return \Illuminate\Contracts\View\Factory|\Illuminate\View\View
*/
public function index()
{
$tv = Tv::count();
$movies = Movie::count();
$collections = Collection::count();
$persons = Person::whereNotNull('still')->count();
$genres = Genre::count();
$networks = Network::count();
$companies = Company::count();
return view('mediahub.index', [
'tv' => $tv,
'movies' => $movies,
'collections' => $collections,
'persons' => $persons,
'genres' => $genres,
'networks' => $networks,
'companies' => $companies,
]);
}
}