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


PHP Employee::all方法代码示例

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


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

示例1: create

 public function create()
 {
     $input = Input::all();
     $customers = Customer::all();
     $salesmen = Employee::all();
     return view('return.create', compact('input', 'customers', 'salesmen'));
 }
开发者ID:MangTomas23,项目名称:tgm,代码行数:7,代码来源:ReturnController.php

示例2: index

 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     // Get all of the models from the database in a collection sorted by name field
     $employees = Employee::all()->sortBy('name');
     // Passes the collection of model instances in JSON format to the view for listing
     return view('phonebook.index', ['employees' => $employees]);
 }
开发者ID:iraklisg,项目名称:AppTree,代码行数:12,代码来源:PhonebookController.php

示例3: getAssigntarget

 public function getAssigntarget()
 {
     $employee = Employee::all();
     $categories = Event::all();
     $userdetails = User::all();
     $targets = Targetassign::all();
     $deals = Deal::all();
     $userData = array();
     $key = 0;
     foreach ($targets as $target) {
         $achieved = 0;
         $userData[$key]['eventcode'] = $target->Eventcode;
         $userData[$key]['event'] = $target->Eventname;
         $userData[$key]['employee'] = $target->Employeeid;
         $userData[$key]['targetVal'] = $target->Targetvalue;
         foreach ($deals as $deal) {
             if ($target->Eventcode == $deal->Eventcode && $target->Employeeid == $deal->Empid) {
                 $achieved = $achieved + $deal->Dealvalue;
             }
         }
         $userData[$key]['achieved'] = $achieved;
         $userData[$key]['variance'] = $achieved - $target->Targetvalue;
         $userData[$key]['cur'] = $target->Currency;
         $key++;
     }
     return View('approval/assigntarget')->with(array('categories' => $categories, 'employee' => $employee, 'userdata' => $userData, 'targets' => $targets, 'eventtable' => $categories));
 }
开发者ID:harshithanaiduk,项目名称:iclock-newtheme,代码行数:27,代码来源:ApprovalController.php

示例4: __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

示例5: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $employee_ids = Employee::all()->lists('id')->toArray();
     $order_states = OrderState::lists('id')->toArray();
     $products = Product::all();
     $municipalities = Municipality::all();
     factory(App\Customer::class, 50)->create()->each(function ($customer) use($employee_ids, $products, $municipalities, $order_states) {
         shuffle($employee_ids);
         shuffle($order_states);
         $customer->user()->save(factory(User::class, 'customer')->create());
         $customer->city_id = $municipalities->shuffle()->first()->id;
         $customer->save();
         $customer->products()->attach($products->shuffle()->first(), ['vote' => rand(1, 5), 'created_at' => Carbon::now(), 'updated_at' => Carbon::now()]);
         $customer->orders()->save(factory(App\Order::class)->create(['acquired_by' => $employee_ids[0], 'state_id' => $order_states[0]]));
     });
     $user = new User();
     $user->name = 'Vid';
     $user->surname = 'Mahovic';
     $user->email = 'vid.mahovic@gmail.com';
     $user->password = 'vid123';
     $user->verified = true;
     $user->save();
     $customer = new Customer();
     $customer->street = 'Celovška 21';
     $customer->city_id = $municipalities->shuffle()->first()->id;
     $customer->phone = '+38640850993';
     $customer->save();
     $customer->user()->save($user);
 }
开发者ID:vidmahovic,项目名称:ep-store,代码行数:34,代码来源:CustomersTableSeeder.php

示例6: getData

 /**
  * Show the form for creating a new resource.
  *
  * @return Response
  */
 public function getData()
 {
     if (!\Request::ajax()) {
         \App::abort(404, 'not found naja');
     }
     $data = App\Employee::all();
     return \Response::json($data);
 }
开发者ID:eragon011,项目名称:H-FBS,代码行数:13,代码来源:HandlebarsController.php

示例7: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $faker = \Faker\Factory::create();
     $rows = Employee::all();
     foreach ($rows as $row) {
         Employee::find($row->id)->account()->where('employee_id', $row->user_id)->update(['access_level' => $faker->randomElement(['User', 'Admin']), 'status' => $faker->randomElement(['Active', 'Deactivated']), 'password' => bcrypt('8d')]);
     }
 }
开发者ID:rob1121,项目名称:qdn,代码行数:13,代码来源:accountSeeder.php

示例8: getIndex

 public function getIndex()
 {
     $categories = Event::all();
     $employee = Employee::all();
     $invoice = Invoice::all();
     $invnull = Invoice::where('Status', '=', 'Null')->get();
     return View('home2')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice, 'invnull' => $invnull));
 }
开发者ID:vikramIde,项目名称:iclock.in,代码行数:8,代码来源:ViewController.php

示例9: run

 /**
  * Run the database seeds.
  *
  * @return void
  */
 public function run()
 {
     $all_emp = Employee::all();
     $dev_number = Device::all()->count();
     $dev_list = range(1, $dev_number);
     foreach ($all_emp as $employee) {
         $employee->devices()->attach($dev_list[array_rand($dev_list)]);
     }
 }
开发者ID:hew86i,项目名称:zkta,代码行数:14,代码来源:EmployeesDevicesTableSeeder.php

示例10: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $data = Employee::all();
     $name = Auth::user()->name;
     $pos = ProjectOfficer::all();
     $adms = Admin::all();
     $tls = Teamleader::all();
     $mems = Member::all();
     return view('dropmin.dashboard.index')->with('data', $name)->with('pos', $pos)->with('adms', $adms)->with('tls', $tls)->with('mems', $mems)->with('data', $data);
 }
开发者ID:arisros,项目名称:drope.mployee,代码行数:15,代码来源:DashboardController.php

示例11: testChildModelKeepsScope

 public function testChildModelKeepsScope()
 {
     factory(User::class, 2)->create(['type' => Employee::class]);
     factory(User::class)->create(['type' => null]);
     $employees = Employee::all();
     $this->assertCount(2, $employees);
     $employees->each(function ($employee) {
         $this->assertInstanceOf(Employee::class, $employee);
     });
 }
开发者ID:tonysm,项目名称:laravel-sti,代码行数:10,代码来源:ExampleTest.php

示例12: getHome

 public function getHome()
 {
     $varr = Auth::user()->empid;
     $evarr = User::where('empid', $varr)->get();
     $edetails = Employee::where('emp_ide_id', $varr)->get();
     $categories = Event::all();
     $employee = Employee::all();
     $invoice = Invoice::all();
     $invnull = Invoice::where('Status', '=', 'Null')->get();
     return View('reviewer/home')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice, 'invnull' => $invnull, 'edetails' => $edetails));
 }
开发者ID:harshithanaiduk,项目名称:iclock-newtheme,代码行数:11,代码来源:ReviewerController.php

示例13: index

 /**
  * Display list device be assigned to
  * 
  * @return Response view
  */
 public function index()
 {
     $devices = Device::all();
     $employees = Employee::all();
     $employall = array();
     $employall += array('0' => 'None');
     foreach ($employees as $key => $value) {
         $employall += array($value->id => $value->lastname . " " . $value->firstname);
     }
     $statusall = StatusDevice::lists('status', 'id');
     return view('devices.borrow', compact('devices', 'employall', 'statusall'));
 }
开发者ID:phanngoc,项目名称:internal-tool,代码行数:17,代码来源:BorrowController.php

示例14: index

 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $interviews = Candidate::where('status_record_id', 3)->get();
     $employees = Employee::all();
     $employall = array();
     $employall += array('0' => 'None');
     foreach ($employees as $key => $value) {
         $employall += array($value->id => $value->lastname . " " . $value->firstname);
     }
     $statusrecord = StatusRecord::lists('name', 'id');
     return view('employee.interview', compact('statusrecord', 'interviews', 'employall'));
 }
开发者ID:phanngoc,项目名称:internal-tool,代码行数:17,代码来源:InterviewController.php

示例15: getHome

 public function getHome()
 {
     $year = date("Y");
     $varr = Auth::user()->empid;
     $evarr = User::where('empid', $varr)->get();
     $edetails = Employee::where('emp_ide_id', $varr)->get();
     $categories = Event::where(DB::raw('year(date)'), $year)->get();
     $employee = Employee::all();
     $invoice = Invoice::orderBy('Id', 'DESC')->where(DB::raw('year(InvoiceDate)'), $year)->where(DB::raw('year(DueDate)'), $year)->get();
     $invnull = Invoice::where('Status', '=', 'Null')->get();
     return View('reviewer/home')->with(array('categories' => $categories, 'employee' => $employee, 'invoice' => $invoice, 'invnull' => $invnull, 'edetails' => $edetails));
 }
开发者ID:harshithanaiduk,项目名称:iclock-updated,代码行数:12,代码来源:ReviewerController.php


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