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


PHP Gallery::all方法代码示例

本文整理汇总了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();
 }
开发者ID:jhunel2389,项目名称:baeyaya-dev,代码行数:4,代码来源:FileMaintenanceController.php

示例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', '');
         }
     }
 }
开发者ID:hilmysyarif,项目名称:LightTravelLaravel,代码行数:20,代码来源:GalleryController.php

示例3: Gallery

 public function Gallery()
 {
     $SliderImages = SliderImages::all();
     $gallery = Gallery::all();
     return View::make('gallery.gallery')->with('slider', $SliderImages)->with('gallery', $gallery);
 }
开发者ID:hilmysyarif,项目名称:LightTravelLaravel,代码行数:6,代码来源:HomeController.php

示例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%"/>
开发者ID:jhunel2389,项目名称:baeyaya-dev,代码行数:31,代码来源:index.blade.php

示例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])));
 }
开发者ID:estebanmatias92,项目名称:pull-automatically-galleries,代码行数:9,代码来源:GalleryTest.php

示例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>
开发者ID:AmaniYunge,项目名称:SYoDeO,代码行数:31,代码来源:list.blade.php

示例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);
 }
开发者ID:hilmysyarif,项目名称:LightTravelLaravel,代码行数:42,代码来源:AddToursController.php

示例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);
 }
开发者ID:robriggen,项目名称:Laravel-Bootstrap,代码行数:6,代码来源:images.php


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