good I find myself doing a library application in laravel at the time of making an individual view of the database using the driver show function I do it in the following way
public function show($id)
{
$libros = Libro::find($id);
if (!is_null($libros))
return view('libro.show', compact('libro'));
else
Session::flash('message','404 Libro no existente');
return Redirect::to('libro');
}
up here without problems until using the function dd ($ books-> title, $ books-> language); it returns the correct results but at the time of calling the show.blade.php method I get the following error:
Please, if someone understands what mistake I am making, it is grateful to clarify. annex the route and the code of the show
show.blade.php
@extends('layouts.admin')
@section('content')
@include('alerts.request')
<h2>{{$libro->titulo }}</h2>
<p>{{$libro->idioma }}</p>
@endsection
and the route
Route::resource('libro','LibroController');
route::get('libro/{id}/show', 'LibroController@show')->where(['id' => '[0-9]+']);