tethys/app/Http/Controllers/PagesController.php

43 lines
931 B
PHP
Raw Normal View History

2018-08-06 12:30:51 +00:00
<?php
2015-07-19 06:49:24 +00:00
2018-08-06 12:30:51 +00:00
namespace App\Http\Controllers;
use App\Dataset;
2015-07-19 06:49:24 +00:00
use App\Book;
use App\Category;
use App\Shelf;
use App\Periode;
use App\Student;
use Illuminate\Http\Request;
2018-08-06 12:30:51 +00:00
use Illuminate\View\View;
class PagesController extends Controller
{
public function __construct()
{
// $this->middleware('auth');
}
public function documents() : View
{
// $books = Book::with('category', 'shelf')->orderByTitle()->get();
$documents = Dataset::orderByType()->get();
return view('rdr.document.documents', compact('documents'));
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id): View
{
$document = Dataset::findOrFail($id);
$document->load('titles');
$document->load('abstracts');
return view('rdr.document.show', compact('document'));
}
2015-07-19 06:49:24 +00:00
}