Author |
Message |
m-eye
Joined: 13 Nov 2018 Posts: 1
|
Posted: Tue Nov 13, 2018 6:53 pm Post subject: Laravel Blade |
|
|
Hi,
I have created a project with laravel. This also encrypted. The adaptation made to the file BladeCompiler.php. Unfortunately, the functions "@section, @if" are not recognized by the blade file. Has anyone ever had this problem? is there a solution here?
best regards |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Wed Nov 14, 2018 9:24 am Post subject: |
|
|
Hi,
The problem is that in Laravel the Blade templates have the extension .blade.php. Thus, the Encoder will encode such files as normal as it regards them as PHP files. (Please note that encoding is not the same as encrypting with the Encoder.)
That will not work because Blade templates have their own mini language with constructs such as @section, @if etc.
We have a blog article which explains how to encode the Models and Controllers of a Laravel project whilst also encrypting the Blade templates. That article is at http://blog.ioncube.com/2016/12/19/ioncube-encoding-laravel-project-controllers-models-templates/
Note that if you encrypt the Blade templates then you will need to make a small change to Laravel itself and encode that part of Laravel. _________________ Alastair
ionCube |
|
Back to top |
|
 |
developer
Joined: 26 Feb 2020 Posts: 1
|
Posted: Wed Feb 26, 2020 7:04 pm Post subject: |
|
|
I have a laravel 6 project and want to encrypt the blades. As you commented before, I followed the article instructions but the output of my home page is only the number "7", do you have idea what is happening with the encrypted files? |
|
Back to top |
|
 |
medomfdr
Joined: 28 Feb 2020 Posts: 1
|
Posted: Fri Feb 28, 2020 10:52 am Post subject: i have same problem as well ! |
|
|
developer wrote: | I have a laravel 6 project and want to encrypt the blades. As you commented before, I followed the article instructions but the output of my home page is only the number "7", do you have idea what is happening with the encrypted files? |
i have same problem as well , is there any update |
|
Back to top |
|
 |
alastair
Joined: 23 Feb 2010 Posts: 405
|
Posted: Fri Feb 28, 2020 2:07 pm Post subject: |
|
|
In Section 6.5, "Error codes", of the User Guide at https://www.ioncube.com/sa/USER-GUIDE.pdf there is the following entry for 7:
"An encrypted file cannot be read by an non-encoded PHP script."
As our blog article says, you must encode the modified part of Laravel containing ioncube_read_file since otherwise ioncube_read_file will not decrypt the encrypted Blade template file. _________________ Alastair
ionCube |
|
Back to top |
|
 |
|