当前位置: 首页>>代码示例>>PHP>>正文


PHP Project::count方法代码示例

本文整理汇总了PHP中app\Project::count方法的典型用法代码示例。如果您正苦于以下问题:PHP Project::count方法的具体用法?PHP Project::count怎么用?PHP Project::count使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在app\Project的用法示例。


在下文中一共展示了Project::count方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct()
 {
     $count = Employee::count();
     $countProj = Project::count();
     $data = Employee::all();
     $YourRole = "";
     if (count(Auth::user()) > 0) {
         $YourRole = Auth::user()->UserRoles->role;
     }
     $Role2 = $this->Role1;
     // Count Unconfirmed
     $cc = 0;
     foreach ($data as $da) {
         if ($da->confirm == 0) {
             $cc++;
         }
     }
     $countConf = $cc;
     // Count Confirmed
     $cc1 = 0;
     foreach ($data as $dat) {
         if ($dat->confirm == 1) {
             $cc1++;
         }
     }
     $countConfirmed = $cc1;
     View::share('countConf', $countConf);
     View::share('YourRole', $YourRole);
     View::share('countConfirmed', $countConfirmed);
     View::share('count', $count);
     View::share('countProj', $countProj);
 }
开发者ID:arisros,项目名称:drope.mployee,代码行数:32,代码来源:Controller.php

示例2: index

 public function index()
 {
     \App\Gini\Gapper\Client::init();
     if (\App\Gini\Gapper\Client::getUserName()) {
         return view('dashboard', ['products_count' => Product::count(), 'servers_count' => Server::count(), 'clients_count' => Client::where('parent_id', 0)->count(), 'projects_count' => Project::count()]);
     }
     return view('login');
 }
开发者ID:genee-projects,项目名称:snail,代码行数:8,代码来源:DashboardController.php

示例3: index

 public function index()
 {
     // 사용자, 프로젝트, 태스트 수 가져오기
     $uc = User::count();
     $pc = Project::count();
     $tc = Task::count();
     $total = ['user' => $uc, 'project' => $pc, 'task' => $tc];
     // 뷰에 전달
     return view('main')->with('total', $total);
 }
开发者ID:richellin,项目名称:laravel5.2-auth,代码行数:10,代码来源:DashboardController.php

示例4: showDashboard

 public function showDashboard()
 {
     $projects = new Project();
     $projectCount = $projects->count();
     $published = $projects->where('published', 1)->count();
     $unpublished = $projects->where('published', 0)->count();
     $illustrations = Illustration::count();
     $logos = Logo::count();
     return view('dashboard/dashboard', compact('projectCount', 'published', 'unpublished', 'illustrations', 'logos'));
 }
开发者ID:harequ,项目名称:redesign-laravel,代码行数:10,代码来源:DashboardController.php

示例5: composeDashboard

 private function composeDashboard()
 {
     view()->composer('admin.index', function ($view) {
         $numArticle = \App\Article::count();
         $numCategory = \App\Category::count();
         $numTag = \App\Tag::count();
         $numProject = \App\Project::count();
         $numMessage = \App\Message::count();
         $view->with(compact('numArticle', 'numCategory', 'numTag', 'numProject', 'numMessage'));
     });
 }
开发者ID:ambarsetyawan,项目名称:laravel5-blog-1,代码行数:11,代码来源:DashboardViewComposerServiceProvider.php

示例6: __construct

 public function __construct()
 {
     $count = Employee::count();
     $countProj = Project::count();
     $data = Employee::all();
     $DataEm = "";
     $YourRole = "";
     $undisplayRoleAcc = "";
     if (count(Auth::user()) > 0) {
         $YourRole = Auth::user()->UserRoles->role;
         if (Auth::user()->id_employees > 0) {
             $DataEm = Employee::where('id', Auth::user()->id_employees)->get();
         }
     }
     if ($YourRole == 11) {
         $undisplayRoleAcc = "undisplayRole";
     }
     $Role2 = $this->Role1;
     // Count Unconfirmed
     $cc = 0;
     foreach ($data as $da) {
         if ($da->confirm == 0) {
             $cc++;
         }
     }
     $countConf = $cc;
     // Count Confirmed
     $cc1 = 0;
     foreach ($data as $dat) {
         if ($dat->confirm == 1) {
             $cc1++;
         }
     }
     $countConfirmed = $cc1;
     View::share('countConf', $countConf);
     View::share('DataEm', $DataEm);
     View::share('undisplayRoleAcc', $undisplayRoleAcc);
     View::share('YourRole', $YourRole);
     View::share('countConfirmed', $countConfirmed);
     View::share('count', $count);
     View::share('countProj', $countProj);
 }
开发者ID:arisros,项目名称:drope.mployee,代码行数:42,代码来源:Controller.php

示例7: function

Route::get('logout', ['as' => 'logout', 'uses' => 'LogController@logout']);
/*Routes Residente*/
Route::group(['namespace' => 'Resident', 'prefix' => 'resident', 'middleware' => ['auth']], function () {
    Route::get('home', ['as' => 'home', 'uses' => 'HomeController@getHome']);
    Route::post('proyecto/avance', ['as' => 'residente.proyecto.avance', 'uses' => 'AvanceController@avanceProyecto']);
    Route::post('proyecto/avance/add', ['as' => 'residente.avance.add', 'uses' => 'AvanceController@addAvance']);
    Route::get('last/advanced', ['as' => 'residente.avance.last', 'uses' => 'AvanceController@last']);
    Route::get('users', ['as' => 'residente.users', 'uses' => 'AvanceController@users']);
    Route::get('all', ['as' => 'residente.all', 'uses' => 'AvanceController@all']);
    Route::resource('advanced', 'AvanceController');
});
/*Routes admin*/
Route::group(['namespace' => 'Admin', 'prefix' => 'admin', 'middleware' => ['auth', 'admin']], function () {
    Route::get('home', function () {
        $residents = \App\Resident::where('type', '<>', 'admin')->count();
        $projects = \App\Project::count();
        $beneficiaries = \App\Beneficiary::count();
        $disenos = \App\Desing::count();
        return view('admin.home', compact('projects', 'residents', 'beneficiaries', 'disenos'));
    });
    Route::post('delete/stage/project', ['as' => 'detele.staage.project', 'uses' => 'ProjectController@deleteStageProject']);
    Route::get('opciones/proyecto', ['as' => 'option.project', 'uses' => 'ProjectController@opciones']);
    Route::post('etapas/proyecto', ['as' => 'admin.project.stage', 'uses' => 'ProjectController@stageProject']);
    Route::post('all/stage', ['uses' => 'ProjectController@allStage']);
    Route::post('nothing/stage', ['uses' => 'ProjectController@nothingStage']);
    Route::post('etapas/proyecto/dos', ['as' => 'admin.add.stage.project', 'uses' => 'ProjectController@stageProjectAdd']);
    Route::resource('proyectos', 'ProjectController');
    Route::post('benficiarios/cambiar/proyecto/', ['as' => 'admin.beneficiarios.change-project', 'uses' => 'BeneficiarioController@changeProject']);
    Route::get('beneficiario/project/{id}', ['as' => 'admin.project.beneficiario', 'uses' => 'BeneficiarioController@directBen']);
    Route::post('residente/change/project/', ['as' => 'admin.residentes.change-project', 'uses' => 'ResidenteController@changeProject']);
    Route::get('residente/project/{id}', ['as' => 'admin.project.residente', 'uses' => 'ResidenteController@directRe']);
开发者ID:JohanArmando,项目名称:ProyectoGrado,代码行数:31,代码来源:routes.php

示例8: getTotalCountOfProjects

 public function getTotalCountOfProjects()
 {
     return Project::count();
 }
开发者ID:jtrupina,项目名称:mobile-app-challenge-2015-web,代码行数:4,代码来源:StatisticsRepository.php

示例9: isEmpty

 /**
  * Returns whether or not any entries exist.
  *
  * @return bool
  */
 public function isEmpty()
 {
     return Project::count() == 0;
 }
开发者ID:uidaho,项目名称:squireproject,代码行数:9,代码来源:ProjectListRequest.php


注:本文中的app\Project::count方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。