Skip to content

Tag: laravel

Can’t understand a logic of Object And Array in php

If I write this line on routes/web.php file It outputs this: That’s cool, but my question is since app()[‘config’] returns an object so how this [“auth.guards.web”]works? Even there is no index with that name! Outside of Laravel I tried to write a class named Test so that it retu…

Laravel localization in routes without prefix

I have a Laravel app in 9 difference languages: I’m trying to set up localized URL’s like: All content on the website is displayed in the correct language but routing returns 404 pages except for default fallback language. My web.php My locale middleware: Using the fallback language URLs in produc…

php substr() and currency symbol strange output

This is a little bit rude code and I am having this output for this simple string formatting sample. $originalValue is equal for example to “$50.00”; $currency is setted correctly to “$”; $value should be “50.00” but this is the result of the above dd() is: b”£50.00&#…