ionCube Logo
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


 
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder

Laravel Blade

Author Message
m-eye



Joined: 13 Nov 2018
Posts: 1

PostPosted: Tue Nov 13, 2018 6:53 pm    Post subject: Laravel Blade Reply with quote

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
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 354

PostPosted: Wed Nov 14, 2018 9:24 am    Post subject: Reply with quote

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
View user's profile Send private message
developer



Joined: 26 Feb 2020
Posts: 1

PostPosted: Wed Feb 26, 2020 7:04 pm    Post subject: Reply with quote

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
View user's profile Send private message
medomfdr



Joined: 28 Feb 2020
Posts: 1

PostPosted: Fri Feb 28, 2020 10:52 am    Post subject: i have same problem as well ! Reply with quote

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
View user's profile Send private message
alastair



Joined: 23 Feb 2010
Posts: 354

PostPosted: Fri Feb 28, 2020 2:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    ionCube Forum Index -> ionCube PHP Encoder All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum