Laravel.com Code Review: 3 'Weird' MVC Structure Things

preview_player
Показать описание

- - - - -
Support the channel by checking out our products:
Рекомендации по теме
Комментарии
Автор

Thanks for this video. I felt some freedom that I can choose to have my own standards if I wanted to and not to worry about anything else.

mahdinaderian
Автор

I prefer to create App\\Utility\\… class with static methods to get those variables whatever I need. I think that more controlled and clean to things such a navigation so on.

olehtalanov
Автор

Seeing this makes me feel like my code isn't shit

yungifez
Автор

My two cents: there was an application in which we needed a menu bar and I did it using PHP within the blade file and it was okay because of the same reason described in this video -- it was code that it was not going to be used in any other place. One year later I redid the menu using components and I was able to avoid using inline PHP in the blade files. Tldr, same result with different approach

askadj
Автор

"The future devolopers, in a year or two, would they understand where to change it." That is important indeed and maybe their IDE is not as powerful as yours.

paulfontaine
Автор

I have locally cloned version of the docs too. When I search online sometimes I find it difficult to find the docs I'm searching for. By having it as a local project I can use PhpStorm to search all files (CTRL + SHIFT + F), which include the markdown files for the docs. Another reason, once I find the method I’m interested in, I can search the docs for further code examples. I have to remember to pull the latest version occasionally and switch branch when searching an older code base.

MichaelPritchardRR
Автор

Practical exemples are awesome, but sometimes discussing the philosophy of things is the way to evolve

julienSibille
Автор

this is somewhat of a special case since all routes must be amended according to the version selected by the user

MarkSnape
Автор

Hello how to make two authentification registration with different inputs in laravel?

juniordiedhiou
Автор

Fun fact, Laravels official site wasn't built by the laravel devs.
They contracted a 3rd party agency to build the new site.

So most likly, this is not how the laravel devs would build a site.

And infact, the official site before the new site, was just a markup site.

tagKnife
Автор

The version should definitely be in the config/app.php file. The rest... it's randomized/shuffled. It could still be placed in a config file (maybe config/about.php ? ) and then called with $team =

intipontt
Автор

Personaly i'm ok with this littles "violations", make sense if you used only in one file like you show us in the examples.

TheMarcelitto
Автор

Regarding the route global vars, i think it's not an elegant way. This file is 💯% to change in any project while if a separated config made, it's not.

gram_o_phone
Автор

What is your say on Laravel attribute synonyms? I for example have an Article with a belongsTo(User) method that is named user() however I would like to name it author() instead. Is there a standard way of doing this? any tips or suggestions?

SanderCokart
Автор

Hey is there a API that i can just include livewire component in vue, so i can make vue route without refresh?
Or can i use only with livewire for that route without refresh?

filmku
Автор

That reminds me of a scenario we faced in the past where we had to wanted a route to do a certain task. This was the only task which was not associated to any particular Controller so we wrote it in a Controller which had the least number of methods and wrote the complete logic there.

Now when I think about that scenario, I have questions as to where should we have written the logic if not Controller or Model because it did not involve any particular model in that route method ?

adarshchacko
Автор

Whats your opinion about calling model specific field directly in the blade
I.e
App\Models\Settings::latest ()->first()->logo_path

tauseedzaman
Автор

In github you can open a vscode editor in the browser to see the repo. Pressing the period key.

josechirino
Автор

can you please tell me how to expose Access-Control-Allow-Methods and Access-Control-Allow-Headers using laravel official cors config ?
I need these headers expose in the response for the front end js

TariqSajid
Автор

Thank you for another great video! I would not do it that way, explicitly not in the template. Would use a separate file. BTW: The team may be international but it’s a man’s world. Where are the women?

gelbehexe