public function anyData()
 {
     $datas = Photo::all();
     if ($datas) {
         foreach ($datas as &$data) {
             $url_edit = route('photo.edit', $data['id']);
             $data['buttons'] = '<div class="btn-group">';
             $data['buttons'] .= '<a href="' . $url_edit . '" class="btn btn-default edit" title="Edit"><i class="fa fa-edit"></i></a>';
             $data['buttons'] .= '<a href="#self" class="btn btn-default delete" title="Delete" data-id="' . $data['id'] . '"><i class="fa fa-remove"></i></a>';
             $data['buttons'] .= '</div>';
         }
         return Datatables::of($datas)->make(true);
     } else {
         return $this->notFoundResponse();
     }
 }
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     $paginates = $this->createPaginator(Photo::all());
     return View::make('pages.photos', ['photos' => $paginates]);
 }
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $photos = Photo::all();
     $data = ['photos' => $photos];
     return view('photo.index', $data);
 }
Exemple #4
0
 /**
  * Display a listing of the resource.
  *
  * @return Response
  */
 public function index()
 {
     $photos = Photo::all();
     return response()->json(\JsonHelper::getSuccessResponse($photos));
 }
@extends('templates.main')

@section('content')
		<div class="portfolio pricingPackages">
			<div class="photoTop3">
				<h1>PROTFOLIO</h1>
				<p>VIEW MY WORK</p>
			</div>
			<h1 style="color:#AF9F66;">CLICK ON AN ALBUM TO VIEW</h1>
			<div id="portfolio2">
			
			<div class="grid2 slideLeft ">
					<figure class="effect-bubba">
						<?php 
$photos = \App\Models\Photo::all();
?>
						<img src="{{asset('img/'.$categories[0]->photos[0]->image)}}" alt="img02"/>
						<figcaption>
							<h2>{{$categories[0]->type}}<span></span></h2>	
							<div class="coverimg">
								@foreach($categories[0]->photos as $photo)
									<a href="#"><img class="hide3" src="{{asset('img/'.$photo->image)}}" data-gallery="first-gallery" alt=""/></a>
								@endforeach
							</div>
						</figcaption>			
					</figure>
					<figure class="effect-bubba">
						<img src="{{asset('img/'.$categories[1]->photos[0]->image)}}"/>
						<figcaption>
							<h2>{{$categories[1]->type}}<span></span></h2>
							<div class="coverimg">
 /**
  * Display a listing of the resource.
  *
  * @return \Illuminate\Http\Response
  */
 public function index()
 {
     return Photo::all();
 }