Open asicode24 opened 3 years ago
Hi, yes currently there is no blade support. I have already noted this as a possible improvement, but at the moment I unfortunately don't have the time and necessity to add this right away.
Hi Hans, Can you explain the use case here if we are not able to connect the models with the generated php view file.
Regards, Asif
Everything that can be done using blade should be already possible in a plain and simple view.php file, also in non-Laravel projects Blade is not always used. My clients and myself are using it without any issues. However, I agree we could save a few characters and add support for @if()
instead of <?php if(): ?>
, but I haven't had the time and need to look into how we could combine this.
Hi Hans,
yes you are right, everything can be achievable in simple plaint PHP even within the laravel framework.
Regards, Asif
If you want to include a blade file you can use the following:
<?php echo view('welcome'); ?>
Put the echo inside view.php in the blocks of your theme folder. Ensure the blade file exists inside the resources/views folder so it can load.
In the example 'welcome' would be the default blade that laravel has on that folder but you can use whatever name or reference a file inside a folder as any PHP route you are accustomed to.
Hi Hans,
Is there any integration bridge between generated .PHP file and .blade.PHP file. We found it that generated PHP files can’t be connected to Laravel models as core PHP files doesn’t support blade directive. Any comments would be great.
Many Thanks!