You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
679 B
33 lines
679 B
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use App\Entities\Pages\PagesRepository;
|
|
use App\Entities\Projects\Project;
|
|
use DB;
|
|
|
|
class PagesController extends Controller {
|
|
private $repo;
|
|
|
|
|
|
public function __construct(PagesRepository $repo)
|
|
{
|
|
$this->repo = $repo;
|
|
}
|
|
|
|
public function home()
|
|
{
|
|
$projectsCount = Project::select(DB::raw('status_id, count(id) as count'))
|
|
->groupBy('status_id')
|
|
->where('owner_id', auth()->id())
|
|
->pluck('count','status_id')
|
|
->all();
|
|
return view('pages.home', compact('projectsCount'));
|
|
}
|
|
|
|
public function about()
|
|
{
|
|
return view('pages.about');
|
|
}
|
|
|
|
}
|