I am trying to encode my Laravel project but unfortunately, Laravel blade templates are not pure PHP .. so the ioncube encoder/reader is unable to encode it properly.
I have tried these ways mentioned here and here, but my views files are not encoded fully ..or not working the way I want (or I have not understood it properly).
so can anyone please help me and tell me to step by step and clear.
These are some of my files inside the blade.php
files which are not encodable.
@php
// alignment direction according to language
$dir = "ltr";
$rtlLang = ['ar'];
if(in_array(getOption('language'),$rtlLang)):
$dir="rtl";
endif;
@endphp
{!! getOption('home_page_meta') !!}
<title>@yield('title')</title>
@endif
{{ csrf_field() }}
{{ getOption('currency_symbol') . number_format(Auth::user()->funds,2, getOption('currency_separator'), '') }}
Finally I got an idea and its worked (no one suggested)
you can easily encode your blade by its original code like an example : {{ getOption() }} to <?php echo e(getOption()); ?>
. and @if
as <php if; ?>
and @section('title', getOption('app_name') . ' - Login')
as <?php $__env->startSection('title', getOption('app_name') . ' - login'); ?>
and like so. And now you can encoded any blade templates files or laravel projects.
Hope this helpful. Now i have saved my templates file from thief.