I literally have just created a Laravel app and i didn't make a single change ( besides adding the make:auth ) and seconds after serving the app it take infinite time to load another view or refresh.
Related
please I have deployed Laravel project to a cPanel, but when the laravel website is not visited for few hours, I revisited the website and it was loading long before it showed its contents. Is there any way I can use to make the laravel website running always?
I'm working on a Laravel, Jetstream InertiaJS with SSR support and VueJS project locally. Whenever I refresh the page it takes a while to show me the content of the page. I'm worried that this might happen in production as well.
The project is really empty, it's a brand new project and I haven't done anything yet.
I used chrome performance recorder to see what is taking time the most and here is the outcome:
Any other Laravel project that I have works super fast except any project that I install with InertiaJS SSR. Has anyone tried it in production?
Long back i had seen my friend pass some arguments after php artisan serve which would basically loaded the server in the browser and whenever there is change made in any file in laravel project that get reflected by auto refreshing the page. Does anybody have any idea as to what argument needs to be passed.
I need a bit of expert feedback on this please as I do not want to start my project in the wrong way.
I would like to keep my Vue code separated from Laravel, the reason being, I may use this vue app later on on Cordova.
First question:
I understand how to host the Laravel API and Vue app on 2 different domains, no problems at all but I am unsure on how to setup the folder when both apps are on the same domain.
I know that Laravel should be hosted below the public_html folder and have a symlink to the public folder for security purpose. But where should my vue app goes?
Second question:
When I save images from Vue(as I am creating a blog) the images are going to the Laravel store/images folder, so each time I want to show an article in my vue app, the API must each time request the content(text and images) from the Laravel API, is this fine? Will the Google bot be able to trigger the API request when requesting the content?(I actually never thought of this...)
Thank you so much!
I am new to laravel It's good for coding but it is not much faster than codeigniter
I have worked with codeigniter it's page loading is less then 5MB but laravel page loading is probably same to 8MB. i want to work with laravel but i need suggestion to make laravel faster then codeigniter
You have many options to speed up your app :
1- run : php artisan optimize
2- disable the debugger
3- disable the services you don`t use in config.app file
4- if you are using homestead or vagrantBox this adds some shared
folders that slows up the process.
5- if you are working in small,medium size project you can use lumen(lightweight version of laravel).
6-Cache your routes by running : php artisan route:cache
7-Cache your config by running : php artisan config:cache
Some other general tips -relevant to laravel- :
1-If you have data that is frequently fetched for example latest articles in a blog or top scores on a list try implementing a caching layer this would enhance your app performance drastically
2-Queues / back ground jobs , are very useful if you have some processes that take time and could be run in the background for example sending an email, crawling the web
and check out those resources :
https://laracasts.com/discuss/channels/general-discussion/laravel-optimizations-or-speed-ups
http://ionut-bajescu.com/posts/view/improving-your-laravel-application-performance
Is Laravel really this slow?
https://mattstauffer.co/blog/laravel-5.0-route-caching