In my opinion --no-dev ist more about security than saving disk space. You usually use it for packages like the Laravel development bar that should not be accessable on production systems - even for hackers.
composer why to check why a package is required. composer install/update --dry-run to check which changes will be made by installing/updating without actually installing/updating anything. And of course composer --help or composer --help to get all the options and a brief description of them.
Thanks for filling in the gaps of my knowledge. I knew most of the tips you mentioned but it's always good to get a solid overview. The --no-dev flag on production was not one I use, but I will now!
Does anybody know why laravel breeze is (or should be, perhaps) only installed on dev environment? I'm curious will it still work like login/register scenario when the package itself is not installed on production?
The logic is that you run breeze:install once and it generates everything you need, locally, and then you don't need that package anymore, may even remove it at all.
@@LaravelDaily thanks for your clear explanation... To be honest I was thinking --dev would install such beta or nightly build package (as the counter term of --prefer-stable) lol, but this video saved my life 😂
As far as I know that is a flag for update or require, but you should never run either of them on production. You should update (perhaps with --prefere-stable) on your dev system, test the results are running, push the composer.log to the production system and than run composer install. The install command does not calculate versions to install, it installs the version that is fixed in the composer.log without asking any questions.
Great tutorial, could u pls make a video for installing laravel package without using terminal command? Im facing some issue where my production server doesn't provide the terminal. Thank you so much.
@Piotreeeek you would be surprised on what kinds of shared hosting environments people are actually able to install Laravel, by uploading files via FTP or some other voodoo magic. But, as they say, "if you can, doesn't mean you should" :)
As I know you should be sure that your local php version is same as server php version while you are pushing composer.lock file. For example, if you have php 7.4 on your local and 7.2 on server, some packages version maybe required php 7.3 or something. Then you wont be able to run composer install on server after you pull composer.lock from your local machine you will get error. Maybe I am wrong but this is happend to me once and I just remove composer.lock on server and then run composer install again .
My general advice is to ensure that environments you work in - local, staging, production, other teammates - would be as identical as possible, PHP version is one of the parameters here.
Thank you for your video Amazing as all time So, what if i want to create dynamic model My problem is I stored data in new table for each user If we had table called payements_vinsmoke Its table payements for user that have vinsmoke as username So in this case Its not good practice to create for each user it model So is there any solution to handle this Warm regards
Hi, Can you please explain how laravel upgrade works ? I have laravel 6, with let say 2 very less known packages and 3 popular packages like spaties permission, then laravel file manager,etc Now I want to upgrade to laravel 8. How do I do that? It would be very nice, if you can make a video on that topic please
I have a demo video of upgrade: th-cam.com/video/mPBkYdrOEdQ/w-d-xo.html So, from Laravel 6 you need to first upgrade to Laravel 7, and then to 8. You may also use a service for it called laravelshift.com
@@LaravelDaily Thanks! I also saw your laravel audit package video, Please do review more packages. It does expands our knowledge. You are like stefan mischook
In my opinion --no-dev ist more about security than saving disk space. You usually use it for packages like the Laravel development bar that should not be accessable on production systems - even for hackers.
Mm, very good point, didn't think about mentioning it.
totally agree, dev packages might cause security issues, they should be avoided on the prod server, that's the main point of dev
Totally agree too. For some packages it is highly recommended to not be installed on production environment, like PHPUnit.
composer why to check why a package is required.
composer install/update --dry-run to check which changes will be made by installing/updating without actually installing/updating anything.
And of course composer --help or composer --help to get all the options and a brief description of them.
Thanks for filling in the gaps of my knowledge. I knew most of the tips you mentioned but it's always good to get a solid overview. The --no-dev flag on production was not one I use, but I will now!
I always wanted to understand these and your detailed and very specific elaboration helped me clearing the concepts. Thanks and Respect from Pakistan.
Thank You. It was again very useful.
Thank you. As always, this is very helpful.
One interesting section is autoload and psr-4. You can use it for example for modularity.
Great tutorial. Thanks.
Hello, i want to give you my own tip i use -vvv for example composer install {some package} -vvv to see how he works behind scenes
Very informative..thankss
great information
Hi Povilas Korop, I have a question about eloquent, How've eloquent works with temporary tables? Greets from Costa Rica and thanks for your videos.
I don't think Eloquent works with temporary tables. Or maybe I misunderstood the question.
@@LaravelDaily Thanks, that was my question.
Does anybody know why laravel breeze is (or should be, perhaps) only installed on dev environment? I'm curious will it still work like login/register scenario when the package itself is not installed on production?
The logic is that you run breeze:install once and it generates everything you need, locally, and then you don't need that package anymore, may even remove it at all.
@@LaravelDaily thanks for your clear explanation...
To be honest I was thinking --dev would install such beta or nightly build package (as the counter term of --prefer-stable) lol, but this video saved my life 😂
Thanks very useful. I read about --prefer-stable. This seems a good addition for production?
Well, I wouldn't trust that those "stable" versions would automatically be really stable by magic. But probably wouldn't hurt.
As far as I know that is a flag for update or require, but you should never run either of them on production. You should update (perhaps with --prefere-stable) on your dev system, test the results are running, push the composer.log to the production system and than run composer install. The install command does not calculate versions to install, it installs the version that is fixed in the composer.log without asking any questions.
Great tutorial, could u pls make a video for installing laravel package without using terminal command? Im facing some issue where my production server doesn't provide the terminal. Thank you so much.
If your server doesn't provide terminal, change the server. Otherwise you will have much more issues in the future.
@Piotreeeek you would be surprised on what kinds of shared hosting environments people are actually able to install Laravel, by uploading files via FTP or some other voodoo magic. But, as they say, "if you can, doesn't mean you should" :)
Haha, i just solved my issue by updating vendor folder 😆😆
As I know you should be sure that your local php version is same as server php version while you are pushing composer.lock file. For example, if you have php 7.4 on your local and 7.2 on server, some packages version maybe required php 7.3 or something. Then you wont be able to run composer install on server after you pull composer.lock from your local machine you will get error. Maybe I am wrong but this is happend to me once and I just remove composer.lock on server and then run composer install again .
My general advice is to ensure that environments you work in - local, staging, production, other teammates - would be as identical as possible, PHP version is one of the parameters here.
Nice video here, I like. Please sir, do a video on website bandwidth. 🙏
Thank you for your video
Amazing as all time
So, what if i want to create dynamic model
My problem is I stored data in new table for each user
If we had table called payements_vinsmoke
Its table payements for user that have vinsmoke as username
So in this case Its not good practice to create for each user it model
So is there any solution to handle this
Warm regards
Thank you
Exactly what I wants to learn from a long,
@Laravel Daily can you make a video on Laravel Octane ?
Currently not in plans, I haven't used it myself, as I don't have even a project where to test it.
thanks
Nice
Hi,
Can you please explain how laravel upgrade works ?
I have laravel 6, with let say 2 very less known packages and 3 popular packages like spaties permission, then laravel file manager,etc
Now I want to upgrade to laravel 8. How do I do that?
It would be very nice, if you can make a video on that topic please
I have a demo video of upgrade: th-cam.com/video/mPBkYdrOEdQ/w-d-xo.html
So, from Laravel 6 you need to first upgrade to Laravel 7, and then to 8.
You may also use a service for it called laravelshift.com
@@LaravelDaily Thanks! I also saw your laravel audit package video, Please do review more packages. It does expands our knowledge. You are like stefan mischook
despite your package is good it is big pain to extract data from it :), mixed static with dynamic bad bad :) even tough I found way to solve it ...
I had the wrong idea of --dev
composer outdated --direct ... To see only packages defined in composer.json
read video title like composer in laravel 6 lol Im blind
Same here 😂