本文整理汇总了PHP中Gallery::all方法的典型用法代码示例。如果您正苦于以下问题:PHP Gallery::all方法的具体用法?PHP Gallery::all怎么用?PHP Gallery::all使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Gallery
的用法示例。
在下文中一共展示了Gallery::all方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: galleryImgs
public function galleryImgs()
{
return Gallery::all();
}
示例2: TitleSave
public function TitleSave($id)
{
//$gallery = Gallery::find($id);
$input_value = array('title' => Input::get('text'));
$input_check = array('title' => array('required'));
$validator = Validator::make($input_value, $input_check);
if ($validator->fails()) {
$error = $validator->messages()->toArray();
$gallery = Gallery::all();
return View::make('admin.gallery.gallery')->with('gallery_img', $gallery)->with('error_gallery', $error);
} else {
$gallery = Gallery::find($id);
$gallery->title = Input::get('text');
$gallery->save();
if ($gallery->save()) {
$gallery = Gallery::all();
return View::make('admin.gallery.gallery')->with('gallery_img', $gallery)->with('edit_gallery_save', '');
}
}
}
示例3: Gallery
public function Gallery()
{
$SliderImages = SliderImages::all();
$gallery = Gallery::all();
return View::make('gallery.gallery')->with('slider', $SliderImages)->with('gallery', $gallery);
}
示例4:
<div class="box">
<div>
<div class="body">
<div class="gallery" align="center">
<!--<h1>Gallery</h1>-->
<br>
<br>
<br>
<?php
$imgGallery1st = Gallery::all()->random(1);
?>
<div class="preview" align="center"><img name="preview" src="{{app('customURL')}}images/{{$imgGallery1st['img_file']}}" alt=""/></div>
<div class="thumbnails">
<?php
$imgGalleries = Gallery::all();
?>
@foreach($imgGalleries as $imgGallery)
<img onmouseover="preview.src=img{{$imgGallery['id']}}.src" name="img{{$imgGallery['id']}}" src="{{app('customURL')}}images/{{$imgGallery['img_file']}}" alt="" width="10%; height=20%"/>
@endforeach
<!--<img onmouseover="preview.src=img2.src" name="img2" src="{{app('customURL')}}images/gallery2.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img3.src" name="img3" src="{{app('customURL')}}images/gallery3.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img4.src" name="img4" src="{{app('customURL')}}images/gallery4.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img5.src" name="img5" src="{{app('customURL')}}images/gallery5.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img6.src" name="img6" src="{{app('customURL')}}images/gallery6.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img7.src" name="img7" src="{{app('customURL')}}images/gallery7.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img8.src" name="img8" src="{{app('customURL')}}images/gallery8.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img9.src" name="img9" src="{{app('customURL')}}images/gallery9.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img10.src" name="img10" src="{{app('customURL')}}images/gallery10.jpg" alt="" width="10%; height=20%"/>
<img onmouseover="preview.src=img11.src" name="img11" src="{{app('customURL')}}images/gallery11.jpg" alt="" width="10%; height=20%"/>
示例5: testCreateListReturnedModelsHasBeenSavedIntoDb
public function testCreateListReturnedModelsHasBeenSavedIntoDb()
{
$gallery = new Gallery();
$models = [new Illuminate\Support\Fluent(['post_content' => 'Dummy content.', 'post_title' => 'Dummy Title 1', 'post_date' => date('Y-m-d H:i:s')]), new Illuminate\Support\Fluent(['post_content' => 'Dummy content.', 'post_title' => 'Dummy Title 2', 'post_date' => date('Y-m-d H:i:s')])];
$ids = $gallery->createList($models)->lists('ID');
$dbIds = Gallery::all()->lists('ID');
assertThat($ids, is(equalTo($dbIds)));
assertThat($ids, is(equalTo([1, 2])));
}
示例6:
<?php
$gallery = Gallery::all();
?>
<table class='table table-striped table-responsive' id='gallerytable'>
<thead>
<tr>
<th>Gallery</th>
</tr>
</thead>
<tbody>
<tr>
<?php
$i = 1;
?>
@foreach($gallery as $gallery)
<td >
<div class="col-xs-12">
<div class="col-sm-5">
@if($gallery->image == "")
{{ HTML::image("http://placehold.it/100x100","",array('class'=>'img-rounded')) }}
@else
{{ HTML::image("uploads/gallery/{$gallery->image}","",array('class'=>'img-rounded thumbnail','style'=>'height:100px;width:100px')) }}
@endif
</div>
<div class="col-sm-7" style="font-size: 12px">
<div class="col-xs-8">
Name : <strong>{{$gallery->name}}</strong><br>
Title : <strong>{{ $gallery->title }}</strong><br>
示例7: pricesearch
public function pricesearch()
{
$index = SliderImages::all();
$country = Country::all();
$city = City::all();
$gallery = Gallery::all();
$startdatae_search = strtotime(Input::get('startdatae_search'));
$startdatae_search = date('Y-m-d H:i:s', $startdatae_search);
$enddate_search = strtotime(Input::get('enddate_search'));
$enddate_search = date('Y-m-d H:i:s', $enddate_search);
$country_search = Input::get('country_search');
$price_search_start = Input::get('price_search_start');
$price_search_end = Input::get('price_search_end');
if ($enddate_search == '1970-01-01 00:00:00') {
$enddate_search = '2038-01-19 00:00:00';
}
if (empty($price_search_start)) {
$price_search_start = '0';
}
if (empty($price_search_end)) {
$res = DB::select(DB::raw('select max(price) as max_price from tours'));
foreach ($res as $value) {
$price_search_end = (int) $value->max_price + 1;
}
}
$tours = new Tours();
if ($startdatae_search != '1970-01-01 00:00:00') {
$tours = $tours->where('start_date', '>', $startdatae_search);
}
if ($enddate_search != '1970-01-01 00:00:00') {
$tours = $tours->where('end_date', '<', $enddate_search);
}
$tours = $tours->where('country', '=', $country_search);
if (!empty($price_search_start)) {
$tours = $tours->where('price', '>', $price_search_start);
}
if (!empty($price_search_end)) {
$tours = $tours->where('price', '<', $price_search_end);
}
$tours = $tours->get();
return View::make('main.search')->with('tours', $tours)->with('country', $country)->with('gallery', $gallery)->with('slider', $index);
}
示例8: get_create
public function get_create()
{
$this->data['create'] = true;
$this->data['galleries'] = Gallery::all();
return View::make('admin.' . $this->views . '.form', $this->data);
}