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


PHP Project::all方法代码示例

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


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

示例1: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     //
     return view('projects.index');
     $projects = Project::all();
     return view('projects.index', compact('projects'));
 }
开发者ID:jwmurray,项目名称:LaravelTasks,代码行数:12,代码来源:ProjectsController.php

示例2: index

 /**
  * Show the application dashboard.
  *
  * @return Response
  */
 public function index()
 {
     $clients = Client::all();
     $projects = Project::all();
     $notes = ClientNote::all();
     return view('home')->with('clientCount', count($clients))->with('projectCount', count($projects))->with('noteCount', count($notes));
 }
开发者ID:goatatwork,项目名称:goatshark,代码行数:12,代码来源:HomeController.php

示例3: directRe

 /**
  * Display the specified resource.
  *
  * @param  int  $id
  * @return Response
  */
 public function directRe($id)
 {
     $proyecto = Project::find($id);
     $boolean = false;
     $projects = Project::all();
     return view('admin.residente.create', compact('proyecto', 'boolean', 'projects'));
 }
开发者ID:JohanArmando,项目名称:ProyectoGrado,代码行数:13,代码来源:ResidenteController.php

示例4: get_single

 public function get_single(Request $request, $id)
 {
     $view = view::make("project");
     $view->projects = Project::all();
     $view->active_project = Project::find($id);
     return $view;
 }
开发者ID:coderehab,项目名称:Tinypmt,代码行数:7,代码来源:ProjectController.php

示例5: composeNavigation

 /**
  *  Bind variables to the navigation bar.
  */
 private function composeNavigation()
 {
     view()->composer('nav', function ($view) {
         $view->with('projects', Project::all());
         $view->with('user', Auth::User());
     });
 }
开发者ID:jaceil,项目名称:abeomehd,代码行数:10,代码来源:ViewComposerServiceProvider.php

示例6: create_project

 public function create_project()
 {
     $project_name = $_POST['project_name'];
     $project = Project::create(['name' => $project_name]);
     $projects = Project::all()->toArray();
     return view('Pages.Projects.project_created', compact('projects'));
 }
开发者ID:piyush-arora,项目名称:hackincloud,代码行数:7,代码来源:ProjectsController.php

示例7: boot

 /**
  * Bootstrap the application services.
  *
  * @return void
  */
 public function boot()
 {
     /**
      * sidebar pm filter (it shows the pm even though the pm is deleted)
      */
     view()->composer('includes.sidebar_home', function ($view) {
         $allprojects = Project::all();
         $fmanagers = [];
         foreach ($allprojects as $project) {
             if (!in_array($project['pm'], $fmanagers)) {
                 $fmanagers[] = $project['pm'];
             }
         }
         $view->with('fmanagers', $fmanagers);
     });
     view()->composer('includes.sidebar_show', function ($view) {
         $allprojects = Project::all();
         $fmanagers = [];
         foreach ($allprojects as $project) {
             if (!in_array($project['pm'], $fmanagers)) {
                 $fmanagers[] = $project['pm'];
             }
         }
         $view->with('fmanagers', $fmanagers);
     });
 }
开发者ID:illuminate3,项目名称:PMPortal,代码行数:31,代码来源:ViewComposerServiceProvider.php

示例8: index

 /**
  * Display a list of all of the user's tickets.
  *
  * @return Response
  */
 public function index()
 {
     $user = Auth::user();
     //dd($user);
     $projects = Project::all();
     $tickets = $this->tickets->forUser($user);
     return view('dashboard.index', ['projects' => $projects, 'tickets' => $tickets]);
 }
开发者ID:JackHammersmith,项目名称:DankScrum,代码行数:13,代码来源:DashboardController.php

示例9: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Ici on va faire en sorte d'afficher les taches des gens qui les ont créé , on vérifie ca grace a leur email
     // comme ca jean pourra pas voir ce que claude a fait par exemple
     $email = Auth::user();
     $projects = Project::all()->where('mail', $email->email);
     return view('pages.showProjects', compact('projects'));
 }
开发者ID:benauto,项目名称:Todo-v2.0,代码行数:13,代码来源:ProjectsController.php

示例10: index

 /**
  * @return Response
  */
 public function index()
 {
     $tokens = Token::all();
     $projects = Project::lists('name', 'pid');
     $all_projects = Project::all();
     //Second variable created here to get around weird indexing needed for pivot table in $projects
     return view('tokens.index', compact('tokens', 'projects', 'all_projects'));
 }
开发者ID:roehlerw,项目名称:Kora3,代码行数:11,代码来源:TokenController.php

示例11: deleteProjects

 /**
  * Deletes a $num project(s).
  *
  * @param $num
  */
 private function deleteProjects($num)
 {
     $entries = Project::all();
     $toDelete = min($num, count($entries));
     for ($i = 0; $i < $toDelete; $i++) {
         $entries[$i]->delete();
     }
     $this->line('Deleted ' . $toDelete . ' projects.');
 }
开发者ID:uidaho,项目名称:squireproject,代码行数:14,代码来源:SafeDeleteProjects.php

示例12: testRestoreProjectAction

 function testRestoreProjectAction()
 {
     Project::find(1)->delete();
     // FIXED fails because Project::find(id) wouldn't return a trashed project
     $this->post('/projects/1/restore')->seeStatusCode(200)->shouldReturnJson();
     $json = $this->_parseJsonResponse();
     $this->assertCount(5, Project::all());
     $this->assertNull($json['deleted_at']);
 }
开发者ID:absolux,项目名称:Collabor8-php-api,代码行数:9,代码来源:ProjectsControllerTest.php

示例13: backend

 /**
  * Display Backend Area.
  */
 public function backend()
 {
     $users = User::where('id', '<>', 1)->get();
     $categories = Category::all();
     $projects = Project::all();
     $images = Image::all();
     $links = Link::all();
     return view('pages/backend/index')->with('users', $users)->with('categories', $categories)->with('projects', $projects)->with('links', $links)->with('images', $images);
 }
开发者ID:schnubor,项目名称:chko.org,代码行数:12,代码来源:PagesController.php

示例14: getProjectsIdsArray

 private function getProjectsIdsArray()
 {
     $result = [];
     $projects = Project::all();
     foreach ($projects as $project) {
         $result[] = $project->id;
     }
     return $result;
 }
开发者ID:haseo2015,项目名称:laravel,代码行数:9,代码来源:DescriptionTableSeeder.php

示例15: dashboard

 public function dashboard()
 {
     $prospeks = Prospek::all();
     $projects = Project::all();
     $pelatihans = Pelatihan::all();
     $rpds = Rpd::mine()->where('status', 'BACK TO INITIATOR')->orWhere('status', 'SUBMIT')->orderBy('kode')->paginate(10);
     $users = Pegawai::all();
     $lpds = Lpd::mine()->where('status', 'BACK TO INITIATOR')->orWhere('status', 'SUBMIT')->orWhere('status', 'TAKE PAYMENT')->where('status', 'BACK TO INITIATOR')->orWhere('status', 'PROCESS PAYMENT')->orderBy('kode')->paginate(10);
     return view('dashboard', compact('prospeks', 'projects', 'pelatihans', 'rpds', 'users', 'lpds'));
 }
开发者ID:nugi,项目名称:SI_Dinas,代码行数:10,代码来源:PagesController.php


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