public function inventoree() { // $inventory = DB::table('tblInventory') // ->join('tblProducts', function($join) // { // $join->on('tblInventory.strProdID','=','tblProducts.strProdID'); // })->get(); $inventory = Inventory::all(); return View::make('inventory')->with('inventory', $inventory); }
/** * Display a listing of the resource. * GET /inventories * * @return Response */ public function index() { $items = Inventory::all(); return View::make('inventories.index')->with('items', $items); }
<?php /* |-------------------------------------------------------------------------- | Application Routes |-------------------------------------------------------------------------- | | Here is where you can register all of the routes for an application. | It's a breeze. Simply tell Laravel the URIs it should respond to | and give it the Closure to execute when that URI is requested. | */ Route::get('/', function () { $t = 1; $inventories = Inventory::all(); return View::make('main/index')->with('inventories', $inventories)->with('t', $t); }); Route::get('/albums', function () { $albums = Collection::all(); return View::make('main/albums')->with('albums', $albums); }); Route::get('/album/{albums}', function ($albums) { $albums = Collection::find($albums); return View::make('main/album')->with(array('albums' => $albums)); }); Route::get('/albums/{album}/image/{image}', function ($album, $image) { $album = Collection::find($album); $image = Inventory::find($image); return View::make('main/image')->with(array('album' => $album, 'image' => $image)); }); Route::get('/login', function () {
public function index() { $this->layout->content = View::make('inventories.index')->with('inventories', Inventory::all()); }
/** * Display a listing of inventories * * @return Response */ public function index() { $inventories = Inventory::all(); return View::make('inventories.index', compact('inventories')); }