Use Laravel Blade as Stubs: My Experiment for Filament

preview_player
Показать описание
I've made an internal Artisan command to generate a PHP class from Blade file. Approve the idea?

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

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

I once used blade to back an XML API, each resource has its own blade XML view, composing them in the XML generated for the response was so satisfying.

TheKluVerKamp
Автор

Pretty ok. Its a good idea to use blade to generate text. Common dev folk is so used to see the blade templating system used for generating HTML that we forget that it could be used for other things as well.

Flankymanga
Автор

I got a good laugh from your explanation of, "I took it personally".

eddiemuller
Автор

Well, just render the extended class with a "use" statement. Explode the full name and get the last element on the "extends" statement.

LuisEduardoBraschi
Автор

is Blade a better option to write a file instead of writing in a stub like laravel has? For your idea such as add extends from another class stub would not be better?

kaueromero
Автор

I use blade to massage a svg which then gets streamed to the browser as a pdf for download ;)

realadnoh