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


PHP Department::orderby方法代码示例

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


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

示例1:

				<div class="span3" id="sidebar">
				<div class="container-fluid">
					<div class="row-fluid">
						<div class="span14">
						  <div class="well sidebar-nav">
						  <li class="nav-header">Departments with active routine</li>
							<?php 
use App\Schedule;
use App\Department;
$routineval = 0;
$departments = Department::orderby('code')->get();
foreach ($departments as $department) {
    $schedules = Schedule::where('department_code', $department->code);
    if ($schedules->exists()) {
        $routineval = 1;
        ?>
							<li><a href='home?depart=<?php 
        echo $department->code;
        ?>
'>{{ $department->code }}</a></li>
							<?php 
    }
}
?>
							@if($routineval == 0)
							<li>No Schedule added yet. </li>
							@endif
						  </div><!--/.well -->
						</div><!--/span-->
				  	</div>
				</div>
开发者ID:nikeshakya,项目名称:KU-SMS,代码行数:31,代码来源:adminsidebar.blade.php

示例2: array

@endsection

@section('navigation')
@include('layouts.include.nav_admin')
@endsection

@section('sidebar')
@include('layouts.include.adminsidebar')
@endsection

@section('bodycontent')
<div class = "span9">	
					{!! Form::open(array('action'=>'AdminScheduleController@viewbatchschedule', 'method'=>'post')) !!} 
						<?php 
use App\Department;
$departements = Department::orderby('code')->lists('code', 'code');
?>
						<fieldset>
						<legend>Batch-wise Schedule</legend>
						<div class="control-group">
						{!! Form::label('departmentcode', 'Select Department:', array('class' => 'control-label')) !!}
						<div class="controls">
						{!! Form::select('selectdepartment', $departements) !!}
						</div>
						</div>
						<div class="control-group">
						<div class="controls">
							{!! Form::submit('Select', ['class'=>'btn btn-primary','value'=>'showdepartbatch', 'name'=>'showdepartbatch']) !!}
						</div>
						</div>
						</fieldset>
开发者ID:nikeshakya,项目名称:KU-SMS,代码行数:31,代码来源:selectdepartment.blade.php

示例3: array

@endsection

@section('bodycontent')
<div class="container">
				{!! Form::open(array('class'=>'form-horizontal', 'action'=>'UserController@registeruser','method'=>'post')) !!} 
						@if ($errors->has())
							<div class="alert alert-danger">
								@foreach ($errors->all() as $error)
									{{ $error }}<br>        
								@endforeach
							</div>
						@endif
						<fieldset>
						<?php 
use App\Department;
$departmentinfo = Department::orderby('code')->lists('code', 'code');
?>
						<legend>Register a teacher</legend>
						<div class="control-group">
						{!! Form::label('userdepartment', 'Department:', array('class' => 'control-label')) !!}
						<div class="controls">
							{!! Form::select('userdepartment', $departmentinfo) !!}
						</div>
						</div>
						<div class="control-group">
						{!! Form::label('username', 'Username:', array('class' => 'control-label')) !!}
						<div class="controls">
						{!! Form::text('username', null, ['placeholder'=>'Enter new username']) !!}
						</div>
						</div>
						<div class="control-group">
开发者ID:nikeshakya,项目名称:KU-SMS,代码行数:31,代码来源:addteacher.blade.php


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