2 ms·
I don't think Laravel is a good example. It uses a lot of global state and static method calls. It copied all bad things that were there in Ruby on Rails. If y
by codedokode 8y ago
I don't think Laravel is a good example. It uses a lot of global state and static method calls. It copied all bad things that were there in Ruby on Rails.
If you look at any code example here [1] you will see that global variables are used everywhere.
[1] https://laravel.com/docs/5.6/urls https://laravel.com/docs/5.6/urls
- deweller 8y agoUsing global variables in a careless fashion is a bad practice indeed. But globals are not universally evil. Laravel uses globals very thoughtfully. Having used the Laravel framework for many years, I agree with many of the choices it has made. Additionally, Laravel does not force you to use Globals. See https://laravel.com/docs/5.6/requests https://laravel.com/docs/5.6/requests to dig a little deeper.