Default Laravel Controller: Fix Type Errors and Change Stubs

preview_player
Показать описание
I want to show a problem that I feel myself, how to fix it manually, or how to prevent it from happening in the future generated files.

- - - - -
Support the channel by checking out my products:

- - - - -
Other places to follow:
Рекомендации по теме
Комментарии
Автор

Publishing the stubs is a great idea, I had no idea these could be customised. I can see this being a huge time saver

bradsi
Автор

hey thanks for sharing amazing videos and you can also replace redirect()->route("//") to to_route("//")

gdm
Автор

Thanks Povilas for the tip as always.

Unpopular opinion: Dark mode is "trendy" but in a video, the contrast is better in light mode but clearly am part of the minority here

Samuel.Mwangi
Автор

I don't have PHPStorm but I suspect union types would work. Like index(): Response|View {}

Автор

Hi Povilas, great video as always, thanks. 🙌

Are the docblocks necessary if we’re adding return types to everything, as I’ve been removing them?

Also, you can change the background on standard terminal in preferences, no? You should try iterm, with Oh My Zsh and-auto completion

gdogmalone
Автор

Why would PHPStorms suggest I add @return Application|Factory|View (and View is for return view instead of just Illuminate\View

ThomasPiraino
Автор

Hello is there any way of showing the validation for input multiple except all error

markjosephmanalo
Автор

Why do you need docblock comments if you can specify types using pure php syntax?

QueeeeenZ
Автор

IMO: If people are not gonna watch a content just because of the color of the background then they should correct their priorities. Its not the color but quality of the content / accurancy of what is being said / how much can i learn that should decide if i am going to watch or not. By the way this strictness of PHPdoc method parameters and return types - its good to be strict because IDEs parse the documentation and their intellisense tends to make suggestions based on the documentation and if the documentation does not reflect sourcecode then bad suggestions tends to cause errors in the code and more time has to be spent in fixing errors.

Flankymanga
Автор

Visual Studio Code - Gang here! not really a problem what you use, but as phpstorm costs i think there are a lot of us using VSC. and i had some problem with intellisense in VSC but package "barryvdh/laravel-ide-helper" solved it :) ps, love the dark theme

GabrielTrosell
Автор

Hello Can I have extention name which auto suggest specifically for Laravel likewise we can see in above video

patelchetan
Автор

what theme do you have in this PhpStorm?

rizkihutama
Автор

Hi love you vid watch them everyday. I was hoping you could help me I remeber on your channel you had a link to site with pre made sql schemas can you link me to the vid again or the site... please 🙏 🙏 🙏 🙏 🙏

FvsJ
Автор

Given you now have proper typed parameters and typed responses and you are using the default Laravel naming conventions for your controller actions you might as well get rid of the PHPDoc comments completely.

JonnyJKF