public function galleryImgs()
 {
     return Gallery::all();
 }
 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', '');
         }
     }
 }
 public function Gallery()
 {
     $SliderImages = SliderImages::all();
     $gallery = Gallery::all();
     return View::make('gallery.gallery')->with('slider', $SliderImages)->with('gallery', $gallery);
 }
예제 #4
0
		<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%"/>
 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
0
<?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>
 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
0
 public function get_create()
 {
     $this->data['create'] = true;
     $this->data['galleries'] = Gallery::all();
     return View::make('admin.' . $this->views . '.form', $this->data);
 }