I have a little problem with the show method of my controller. What I want to do is show a single record, but I do not recognize the view to which I am pointing.
This is my method where I want to redirect my vision
public function show($id)
{
//
$empresa = User::find($id);
return view('welcome', ['empresa' => $empresa]);
}
This is my route
Route::resource('/', 'Users\EmpresaController');
This is my view, where by clicking on the image or something should redirect me to my welcome view.
@foreach($empresas as $empresa)
<a href="{{url('/',array($empresa->id))}}">
<div class="col-md-4">
<div class="thumbnail">
<img src="{{asset('imagenes/empresas/'.$empresa->foto)}}" height="320" width="150" alt="">
<div class="caption">
<h4><a href="#">{{$empresa->name}}</a>
</h4>
<p>pagina web <a target="_blank" href="http://www.bootsnipp.com">www.ejemplo.com</a>.</p>
</div>
<div class="ratings">
<p class="pull-right">15 encuestas</p>
<p>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
<span class="glyphicon glyphicon-star"></span>
</p>
</div>
</div>
</div>
</a>
@endforeach
and this is the message that comes out
Sorry, the page you are looking for could not be found
What is I doing wrong?