本文整理汇总了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">×</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">×</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">×</a>:message</div>') }}
@if(Session::has('url_error'))
<div class="alert alert-danger"><a href="#" class="close" data-dismiss="alert">×</a>{{ Session::get('url_error') }}</div>
@endif
示例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">×</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">×</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">×</a>:message</div>') }}
</div>
<div class="form-group">
示例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">×</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">×</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">×</a>:message</div>') }}
</div>
<div class="form-group">