Having a problem with the links in the menus.
At the moment, the linkage between the views is done through links inside of views which are ruled by the controller.
Example, in this view,
we have the show view for companies.
The link that says 'Edit About Page Tiago', looks like the following:
<p><a href="{{route('company.companies.about.edit', $company->companyID)}}">Edit About Page {{$company->Company_Name}}</a></p>
where $company->companyID is being grabbend from the controller, which looks like this:
public function show($id)
{
//
$company = Company::findOrFail($id);
return view('company.companies.show', compact('company'));
}
and has the following route:
GET|HEAD | company/companies/{company} | company.companies.show | App\Http\Controllers\CompanyCompaniesController@show | web,company
GET|HEAD | company/companies/about/{about}/edit | company.companies.about.edit | App\Http\Controllers\CompanyAboutController@edit | web,company |
At the moment, when I try to access, through the menu, 'About', I'm trying to access this:
<li>
<a href="{{route('company.companies.about.edit', $company->companyID)}}"><i class="fa fa-dashboard fa-fw"></i> About</a>
</li>
which is code inside of a layout view. The following error comes through:
What can I do for, once pressing the 'About', to be redirected in the same way like in the 'Edit About Page Tiago'?
Asking it in another way, where can I give the information to $company if that variable is inside of a layout view and not in a normal view which I can do through the controller?
It might be a basic problem to solve, but somehow is blocking me.
Any given help is appreciated
Tiago