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.
35 lines
769 B
35 lines
769 B
<?php
|
|
|
|
namespace App\Providers;
|
|
|
|
use App\Entities\Projects\Project;
|
|
use DB;
|
|
use Illuminate\Support\ServiceProvider;
|
|
|
|
class AppServiceProvider extends ServiceProvider
|
|
{
|
|
/**
|
|
* Bootstrap any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function boot()
|
|
{
|
|
require_once app_path() . '/helpers.php';
|
|
$projectCounts = Project::select(DB::raw('status_id, count(id) as count'))
|
|
->groupBy('status_id')
|
|
->lists('count','status_id')
|
|
->all();
|
|
view()->share('projectCounts', $projectCounts);
|
|
}
|
|
|
|
/**
|
|
* Register any application services.
|
|
*
|
|
* @return void
|
|
*/
|
|
public function register()
|
|
{
|
|
//
|
|
}
|
|
}
|