i'm new to Laravel, but I've been working at it. I've searched the site but can't find specific help. I've created a variable in my Controller (and checked it a 1000 times against a tutorial) and passed it to the view, but the browser gives an error "Undefined variable".
$company holds the table row after posting. I suspect it may have something to do with it being an array.
Controller resource function show
public function show($comp_id)
{
$company = Company::find($comp_id);
return view('companies.show')->with('company', $company);
}
And in the view:
@section('content')
<h1>{{ $company->CompanyName }}</h1>
I'm sure it's a simple error, but any help please?