You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
552 B
27 lines
552 B
<?php
|
|
|
|
namespace App\Http\Controllers;
|
|
|
|
use Illuminate\Http\Request;
|
|
use App\Models\Brewerie;
|
|
use App\Models\Summarie;
|
|
|
|
class BreweryController extends Controller
|
|
{
|
|
public function __construct()
|
|
{
|
|
$this->middleware('auth');
|
|
}
|
|
|
|
|
|
public function index($breweryID)
|
|
{
|
|
$breweries = Brewerie::where('id', (int)$breweryID)->get();
|
|
$beers = Summarie::where('brewery_id', $breweryID)->get();
|
|
$data = array('breweries'=>$breweries, 'beers'=>$beers);
|
|
return view('brewery', compact('breweries', 'beers'));
|
|
}
|
|
|
|
|
|
}
|
|
|