We are working for update doc for SXIMO 5.1.7

Registering your own Helpers/Function

Sometime you need to create your own function for used a cross controller and view . Ofcourse , you can use more than one table inside model .

All Libray are stored at /app/Libray/

Helper Class Structure

	<?php namespace App\Library;    
	class MyHelpers   {    

Method / Function

	class MyHelpers   {        
		static function myFirstFunction(){          
			return 'hai this is my first function';      


Register your method to controller if you want to include your model into spesific controller , you need to register model

<?php namespace App\Http\Controllers;    
	use App\Http\Controllers\controller;  
	/* Registering model */  
	use App\Library\MyHelpers;  
	/* End Registering Helpers */ 

Calling your model and function inside controller

$var  = Helpers::myFirstFunction();  

Calling your model and function directly without have to register

$var  = \app\Models\Helpers::myFirstFunction();