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


PHP Acl::categorySelect方法代码示例

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


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

示例1: isset

				<div class="alert alert-danger">{{ $error }}</div>
			@endforeach	
		@endif

		{{ Form::open(['route' => 'domain.create.post']) }}
		
		<div class="form-group">
			{{ Form::label(trans('directory.select_category')) }}	
						
			<?php 
$category_id = Session::get('category_id');
$selected = null;
if ($category_id != 0) {
    $selected = $category_id;
}
echo isset($selected) ? Acl::categorySelect($selected) : Acl::categorySelect();
?>
			
			{{ $errors->first('category_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
			
			<p>{{ HTML::link('category/create', trans('directory.add_category')) }}</p>
			
			{{ $errors->first('parent_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
		</div>
		<div class="form-group">
			{{ Form::label('inputUrl', trans('directory.url'), ['class' => 'required-field', 'placeholder' => trans('directory.url')]) }}
			{{ Form::text('url', null, ['class' => 'form-control']) }}
			{{ $errors->first('url', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
			@if(Session::has('url_error'))
				<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">&times;</a>{{ Session::get('url_error') }}</div>
			@endif	
开发者ID:CalinB,项目名称:web-directory,代码行数:31,代码来源:create.blade.php

示例2: trans

		@endif
		@if(isset($errors))
			@foreach($errors as $error)
				<div class="alert alert-danger">{{ $error }}</div>
			@endforeach	
		@endif

		{{ Form::open(['route' => 'domain.create.post']) }}
		
		{{ Form::hidden('id', $attempt->id) }}
		
		<div class="form-group">
			{{ Form::label(trans('directory.select_category')) }}	
						
			<?php 
echo Acl::categorySelect($attempt->category_id);
?>
			
			{{ $errors->first('category_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
			
			<p>{{ HTML::link('category/create', trans('directory.add_category')) }}</p>
			
			{{ $errors->first('parent_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
		</div>
		<div class="form-group">
			{{ Form::label('inputName', trans('directory.name'), ['class' => 'required-field']) }}	
			<p class="small">{{ trans('directory.domain_name_rules') }}</p>
			{{ Form::text('name', $attempt->name, ['class' => 'form-control', 'id' => 'inputName', 'placeholder' => trans('directory.name')]) }}
			{{ $errors->first('name', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
		</div>	
		<div class="form-group">
开发者ID:CalinB,项目名称:web-directory,代码行数:31,代码来源:attempt_add.blade.php

示例3: trans

		@endif
		@if(isset($errors))
			@foreach($errors as $error)
				<div class="alert alert-danger">{{ $error }}</div>
			@endforeach	
		@endif

		{{ Form::open(['route' => 'domain.edit.post']) }}
		
		{{ Form::hidden('id', $domain->id) }}
		
		<div class="form-group">
			{{ Form::label(trans('directory.select_category')) }}	
						
			<?php 
echo Acl::categorySelect($domain->category_id);
?>
			
			{{ $errors->first('category_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
			
			<p>{{ HTML::link('category/create', trans('directory.add_category')) }}</p>
			
			{{ $errors->first('parent_id', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
		</div>
		<div class="form-group">
			{{ Form::label('inputName', trans('directory.name'), ['class' => 'required-field']) }}	
			<p class="small">{{ trans('directory.domain_name_rules') }}</p>
			{{ Form::text('name', $domain->name, ['class' => 'form-control', 'id' => 'inputName', 'placeholder' => trans('directory.name')]) }}
			{{ $errors->first('name', '<div class="alert alert-danger small"><a href="#" class="close" data-dismiss="alert">&times;</a>:message</div>') }}
		</div>	
		<div class="form-group">
开发者ID:CalinB,项目名称:web-directory,代码行数:31,代码来源:edit.blade.php


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