@starmatt Thank you!! So the best way is to give PHP variables to the view through the web routes.
Now my PHP array is over 500 lines, how can I refer this from another location in the web routes, without having to insert the complete array inside the web routes file?
(same for controller, if i'd use the controller, I'd still wouldn't want the 500+ array sitting in the controller...)
Well, you could save it to your database, and then access it via a model or the DB facade, or create a function somewhere that returns the array, so you can just call getMyArray() for instance to retrieve it in your application, a little bit like Laravel's config files.
Honestly I don't know much about SEO. But I can't think of why Google wouldn't cache it.
That's up to you and what the architecture of your folders looks like. A default location could be in a Helper class, for instance in App/Helper/Helper.php. But again, that's up to you.
Sorry I'm still quite new at Laravel and the back end.
I had a look at the commands available to make classes in Laravel, but I couldn't find the helper class.
make
make:auth Scaffold basic login and registration views and routes
make:command Create a new Artisan command
make:controller Create a new controller class
make:event Create a new event class
make:job Create a new job class
make:listener Create a new event listener class
make:mail Create a new email class
make:middleware Create a new middleware class
make:migration Create a new migration file
make:model Create a new Eloquent model class
make:notification Create a new notification class
make:policy Create a new policy class
make:provider Create a new service provider class
make:request Create a new form request class
make:seeder Create a new seeder class
make:test Create a new test class
Do you know how to create this class you mentioned?
Yeah I know :)
It would have to be a custom class, not something that's already part of Laravel. That's why it's up to you where to put it.
If you're new to php, check the video series here on Laracasts.
If creating your own custom class is too complicated for you at this point I can give you an exemple you can use.