title: How to encode and license my laravel project using ioncube?
body: <p>I want to deploy my laravel project on our client machine which has no network access .I have to install it on his machine on local server. However I don't want to lose the source code if somebody tries to hack it.</p>
  
  <p>Searched and found that ioncube encoder is a perfect solution. I did encode my necessary project files. It was all good until licensing of the product. </p>
  
  <p>We are planning to give a 1 year license which can be renewed upon entering a pattern that he gets if he decides to continue with us(also if he pays).</p>
  
  <p><a href="https://www.ioncube.com/sa/USER-GUIDE.pdf" rel="nofollow noreferrer">This user guide</a> helps me till <strong>encoding and first time licensing of the product</strong>. I am using laravel 5.2 , mysql and angular for the project.</p>
  
  <pre><code>./make_license --passphrase **** --expire-in 1h --header-line '&lt;?php exit(0);?&gt;'
  </code></pre>
  
  <p>I have followed <a href="http://kbeezie.com/generating-ioncube-licenses/" rel="nofollow noreferrer">this</a> tutorial also.</p>
  
  <p>Problem begins right from the license expiry. If license expires , server throws a fatal error. Capturing fatal error exception for licensing 'll hide all other fatal errors from me which is not ideal. </p>
  
  <pre><code>if($exception instanceof FatalErrorException)
  {
      return response(view('error.license'), 400);
  }
  </code></pre>
  
  <p>What is the best method that I can implement here, for renewing license?</p>
  
  <p>Also how can I catch the fatal error exception of ioncube license expiry separately in laravel?</p>
  
  <p>Thank you</p>