本文整理汇总了PHP中app\Employee类的典型用法代码示例。如果您正苦于以下问题:PHP Employee类的具体用法?PHP Employee怎么用?PHP Employee使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Employee类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: run
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
$user = new Employee();
$user->name = 'Administrator';
$user->email = '[email protected]';
$user->password = bcrypt('marktimbol');
$user->save();
}
开发者ID:marktimbol,项目名称:eclipse-tourism,代码行数:13,代码来源:UserTableSeeder.php
示例2: store
/**
* Store a newly created resource in storage.
*
* @param Request $request
* @return Response
*/
public function store(Request $request)
{
$this->validate($request, ['first_name' => 'required|max:100', 'middle_name' => 'required|max:100', 'last_name' => 'required|max:100', 'emp_id' => 'required|max:100', 'card_no' => 'required|max:100']);
$employee = new Employee();
$employee->first_name = $request->first_name;
$employee->middle_name = $request->middle_name;
$employee->last_name = $request->last_name;
$employee->emp_id = $request->emp_id;
$employee->card_no = $request->card_no;
$employee->active = 1;
$employee->save();
Session::flash('flash_message', 'Terminal successfully added!');
return redirect()->route("employee.index");
}
开发者ID:renciebautista,项目名称:em,代码行数:20,代码来源:EmployeesController.php
示例3: 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
示例4: destroy
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function destroy($id)
{
$employee = Employee::findOrFail($id);
$name = $employee->name . " " . $employee->lastname;
Employee::destroy($id);
return redirect(route('employees.index'))->with('message', 'Empleado ' . $name . ' eliminado corectamente');
}
开发者ID:edwardricardo,项目名称:zenska,代码行数:13,代码来源:EmployeeController.php
示例5: achievement
public function achievement()
{
$AMIds = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$MRs = Employee::whereIn('manager_id', $AMIds)->get();
$dataView = ['MRs' => $MRs];
return view('sm.line.history.search', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:LineController.php
示例6: __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
示例7: search
public function search()
{
$AMs = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$MRs = Employee::whereIn('manager_id', $AMs)->get();
$dataView = ['MRs' => $MRs];
return view('sm.search.plans.search', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:PlanController.php
示例8: index
/**
* Display a listing of the resource.
*
* @return Response
*/
public function index()
{
$suppliers = Supplier::orderBy('name')->get();
$employees = Employee::orderBy('firstname')->get();
$customers = Customer::orderBy('name')->get();
return view('inventory.home', compact(['suppliers', 'employees', 'customers']));
}
开发者ID:MangTomas23,项目名称:tgm,代码行数:12,代码来源:InventoryController.php
示例9: store
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
//
$transaction = $request->all();
$empId = $transaction["empId"]['id'];
$siteId = $transaction["siteId"]['id'];
$workDate = $transaction["workDate"];
$day = (double) $transaction["day"];
$ot = (double) $transaction["ot"];
$advance = (double) $transaction["advance"];
//$wage = DB::select(DB::raw("select employee.wage from employee where employee.id=$empId "));
$wage = Employee::where('id', $empId)->first()->wage;
//dd($wage);
$amount = (double) (($day + $ot / 8.0) * $wage);
$transact = SiteEmployeeRel::create(['siteId' => $siteId, 'empId' => $empId, 'workDate' => $workDate, 'day' => $day, 'ot' => $ot, 'advance' => $advance, 'amount' => $amount, 'advance' => $advance]);
//return $transact;
//getting current date
$currentDate = Carbon::now();
//getting current year
$currentYear = $currentDate->year;
//getting current month
$currentMonth = $currentDate->month;
//getting the employee transaction according to current month and year
$transactions = DB::select(DB::raw("select e.name as empName,e.wage, s.name as siteName, t.workDate, t.day ,t.ot,t.advance,t.amount from siteemployeerel as t\n inner join employee as e on t.empId = e.id\n inner join site as s on t.siteId = s.id\n where year(t.workDate) = {$currentYear} and month(t.workDate) = {$currentMonth}\n order by t.created_at;"));
return json_encode(array('transactions' => $transactions));
}
开发者ID:AshishXhrestha,项目名称:goe,代码行数:32,代码来源:TransactionController.php
示例10: testCanRemoveScope
public function testCanRemoveScope()
{
factory(User::class)->create(['type' => null]);
factory(User::class)->create(['type' => Employee::class]);
$users = Employee::withoutGlobalScope(\App\SingleTableInheritanceScope::class)->get();
$this->assertCount(2, $users);
}
开发者ID:tonysm,项目名称:laravel-sti,代码行数:7,代码来源:ExampleTest.php
示例11: edit
public function edit($salarySheetId, $salarySheetRecordId)
{
$salary_sheet = SalarySheet::find($salarySheetId);
$employees = Employee::lists('name', 'id')->sort();
$salary_sheet_record = SalarySheetRecord::find($salarySheetRecordId);
return view('hr.salary_sheet.edit', compact('salary_sheet', 'employees', 'salary_sheet_record'));
}
开发者ID:jubaedprince,项目名称:rkt,代码行数:7,代码来源:SalarySheetSalarySheetRecordsController.php
示例12: update
public function update($id)
{
$task = Task::findOrFail($id);
$employees = Employee::where('level_id', '<>', 1)->get();
$dataView = ['task' => $task, 'employees' => $employees];
return view('admin.task.edit', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:TaskController.php
示例13: 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 = '[email protected]';
$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
示例14: listAll
public function listAll()
{
$employees = Employee::select('id')->where('manager_id', \Auth::user()->id)->get();
$customers = Customer::whereIn('mr_id', $employees)->get();
$dataView = ['customers' => $customers];
return view('am.customer.list', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:CustomerController.php
示例15: compose
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$view->with('disposition_check', ['use as is', 'ncmr#', 'rework', 'split lot', 'shutdown', 'shipback']);
$view->with('cod_check', ['production', 'process', 'maintenance', 'facilities', 'quality assurance', 'others']);
$view->with('approvers', ['production', 'process', 'quality assurance', 'others']);
$view->with('names', Employee::select('name')->orderBy('name')->where('name', '<>', Auth::User()->employee->name)->get());
}
开发者ID:rob1121,项目名称:qdn,代码行数:13,代码来源:RecordUpdateComposer.php
示例16: update
public function update($id)
{
$customer = Customer::findOrFail($id);
$mrs = Employee::where('level_id', 7)->active()->get();
$dataView = ['customer' => $customer, 'mrs' => $mrs];
return view('admin.customer.edit', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:CustomerController.php
示例17: getIndex
/**
* Display a listing of the resource.
*
* @return Response
*/
public function getIndex()
{
$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('targetmodule/assigntarget')->with(array('categories' => $categories, 'employee' => $employee, 'userdata' => $userData, 'targets' => $targets, 'eventtable' => $categories));
}
开发者ID:vikramIde,项目名称:iclock.in,代码行数:32,代码来源:AssigntargetController.php
示例18: search
public function search()
{
$products = Product::where('line_id', Employee::find(\Auth::user()->id)->line_id)->get();
$doctors = Customer::where('mr_id', \Auth::user()->id)->get();
$dataView = ['products' => $products, 'doctors' => $doctors];
return view('mr.search.sales.search', $dataView);
}
开发者ID:m-gamal,项目名称:crm,代码行数:7,代码来源:SaleController.php
示例19: compose
/**
* Bind data to the view.
*
* @param View $view
* @return void
*/
public function compose(View $view)
{
$view->with('select_failure_mode', ['Assembly', 'Environment', 'Machine', 'Man', 'Material', 'Method / Process']);
$view->with('customers', Option::orderBy('customer')->select('customer')->get());
$view->with('machines', Machine::orderBy('name')->select('name')->get());
$view->with('stations', Station::select('station')->get());
$view->with('employees', Employee::orderBy('name')->select('name')->where('name', '<>', Auth::user()->employee->name)->get());
}
开发者ID:rob1121,项目名称:qdn,代码行数:14,代码来源:FormOptionComposer.php
示例20: 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
注:本文中的app\Employee类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论