Laravel 5 5 tutorial 24 how to retrieve one record from the database in laravel

preview_player
Показать описание
Laravel 5 5 tutorial 24 how to retrieve one record from the database in laravel

IMPORTANT LINKS:

Donate to help us make more videos:

Follow us on social media:
Рекомендации по теме
Комментарии
Автор

for company href use: {{route('companies.show', ['id'=>$company->id])}}

adam
Автор

In CompaniesController.php you can put:
public function show(Company $company)
{
return view('pages.companies.show')->with('company', $company);
}

adam
Автор

Show function takes an argument of Company object ($company). This object is injected by the framework and it's available. Why are you re-retrieve it from the database with it's id field and re-assign it to $company?

sotiristsakiridis
Автор

Hi, has anyone experienced this too?? When I click on my companies in the list.. I get the message "Sorry, the page you are looking for could not be found."

So I presume my links or paths somewhere must be broken. Could you help point me towards places I should look please I'm not sure myself, I have attempted to figure it out.

LillyCode
Автор

i am getting of undefined variable company

vanitachaudhari
Автор

before control page use href link it also show

mousumimimi
visit shbcf.ru