D
D
Dadoshik2017-07-11 18:59:55
Laravel
Dadoshik, 2017-07-11 18:59:55

How to include a file with an array in a controller in Laravel 5?

Good evening!
There is a php file with an array of names and surnames inside. How to connect it in the controller and use the contents of the array?
Define it in a namespace?
use App\Service\Name;
What next?
$name[] = Name::all()?
PS The question arose, but there is no access to the computer at the moment. Please help.

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question