Answer the question
In order to leave comments, you need to log in
What is the most beautiful solution for displaying different text in one template with different actions?
Hello members!
One template handles lists:
/**
* Активные документы.
*/
public function getActiveList()
{
return view('backend.docflow.document.list')
->with('documents', $this->documentRepository->getActivePaginated(5, 'id', 'desc'));
}
/**
* Заблокированные документы.
*/
public function getInactiveList()
{
return view('backend.docflow.document.list')
->with('documents', $this->documentRepository->getInactivePaginated(5, 'id', 'desc'));
}
/**
* Заблокированные документы.
*/
public function getDeletedList()
{
return view('backend.docflow.document.list')
->with('documents', $this->documentRepository->getDeletedPaginated(5, 'id', 'desc'));
}
{{ dd(Route::getCurrentRoute()->getActionMethod()) }}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question