コード例 #1
0
 public function run()
 {
     EmpPos::create(['postname' => 'Admin Assistant 1', 'dept_id' => '1']);
     EmpPos::create(['postname' => 'Admin Assistant 2', 'dept_id' => '1']);
     EmpPos::create(['postname' => 'Admin Assistant 3', 'dept_id' => '1']);
     EmpPos::create(['postname' => 'Accountant 1', 'dept_id' => '2']);
     EmpPos::create(['postname' => 'Accountant 2', 'dept_id' => '2']);
     EmpPos::create(['postname' => 'Bookkeeper', 'dept_id' => '2']);
     EmpPos::create(['postname' => 'Financial Analyst 1', 'dept_id' => '3']);
     EmpPos::create(['postname' => 'Financial Analyst 2', 'dept_id' => '3']);
 }
コード例 #2
0
					<div class="col-md-3">
						{{ Form::twbsText('Height: ', 'height', ['fromModel' => $user], ['maxlength' => '30']) }}

					</div>

					<div class="col-md-3">
						{{ Form::twbsText('Weight: ', 'weight', ['fromModel' => $user], ['maxlength' => '30']) }}

					</div>
					<div class="col-md-3">
						{{ Form::twbsText('Citizenship: ', 'citizenship', ['fromModel' => $user], ['maxlength' => '30']) }}

					</div>
				</div>
				<?php 
$position = EmpPos::where('id', $user->pos_id)->get();
$department = Department::where('id', $user->department_id)->get();
?>
				 <div class="row">
				
				@foreach ($department as $d)
					<div class="col-md-4">
						<div class="form-group">
							<label for="department_id" class="control-label">Department</label>
							<select class="form-control" id="department_id" name="department_id">
								<option value="{{ $d->id }}">{{ $d->name }}</option>
								<option value=" ">------------------------------------</option>
								@foreach ($alldepartments as $dept)
								<option value="{{ $dept->id }}">{{ $dept->name}}</option>
								@endforeach
コード例 #3
0
	      				<th>Employee Id</th>
	      				<th>Name</th>
	      				<th>Department</th>
	      				<th>Position</th>
	      				<th>Date Resigned</th>
	      				<th>Action</th>
	      			</tr>
	      		</thead>
	      		<tbody>
	      			@foreach($users as $user)
	      				<tr>
	      					<td>{{ $user->id }}</td>
	      					<td>{{ $user->formatName(':ln, :fn :mi') }}</td>
	      					<td>{{ $user->department->name}}</td>
	      					<?php 
$position = EmpPos::find($user->pos_id);
?>

	      					 <td>{{ $position->postname }}</td>
	      					 <td>{{ date('F d, Y', strtotime($user->deleted_at)) }}</td>
	      					 <td><a href="{{ route('restore-user', $user->id) }}" class="btn btn-md" style="background-color:#4D3382; color:white;"><i class="fa fa-magic"></i> Restore</a></td>

	      				</tr>
	      			@endforeach
	      		</tbody>
	      	</table>

	      </div>

	        <div class="tab-pane" id="DeletedProperties">