“Love beautiful code? We do too. The PHP Framework For Web Artisans “- well that is all that laravel.com captured about their intuitive and comprehensive framework on their website.  If you are a framework fanatic, devotee or even a bigot then I do not have to talk much about it, all the same if you are not then the following result from a simple Google search should be helpful.
 
In computer systems, a framework is often a layered structure indicating what kind of programs can or should be built and how they would interrelate. Some computer system frameworks also include actual programs, specify programming interfaces, or offer programming tools for using the frameworks – WhatIs.com. If the above definition did not leave you more confused than before than we good, all the same the famous Wikipedia.com provides a simpler definition. A software framework is an abstraction in which software providing generic functionality can be selectively changed by additional user-written code, thus providing application-specific software, simply put a reusable set of libraries or classes for a software system.
 
Back to Laravel, it is a free, open-source PHP web framework, created by Taylor Otwell and intended for the development of web applications following the model–view–controller (MVC) architectural pattern. Some of the features of Laravel are a modular packaging system with a dedicated dependency manager, different ways for accessing relational databases, utilities that aid in application deployment and maintenance, and its orientation toward syntactic sugar. As of March 2015, Laravel is regarded as one of the most popular PHP frameworks, together with Symfony2, Nette, CodeIgniter, Yii2 and other frameworks. Laravel of the writing of this article has a version number of 5.2 since it’s candidate release on June 9, 2011.
 
Let’s hold off on the history just a little bit, thus an article for another day and once again get back to the topic under consideration. A simple Google search on the topic would yield tons of result of diverse methods or ways to achieve the same goal, but the enlisted method in my candid opinion is the simplest way.  If you have done some development in PHP then you can greatly appreciate the need and use of custom functions or methods as they are called in the MVC world in a development process.
 
The following steps are on the assumption that reader:
  1. Has working knowledge of a unix or Linux system and can run simple commads and create files.
  2. Has a working copy of a Laravel 5.2 application on a linux system, with the following application structure
 
Step 1
            Create a Helpers folder under the app directory of the Laravel application and then create a Helper.php file in the Helpers folder. The final path structure of the file must be as follows  app\Helpers\Helper.php
 
The Helper.php file created is the file to house all you custom function.  Define a Helper class and place all the methods (custom functions ) in this file
 
<?php // Code within app\Helpers\Helper.php

namespace App\Helpers;

class Helper
{	
	//simple class to capitalize
	public static function uppercase($string)
	{
		return strtoupper($string); 
	}
}
 
 
Step 2
            Create an alias for the Helper class defined in the Helper.php. To do this navigate to the config folder in the Laravel application and edit the  app.php file . Navigate to the section that reads 'aliases' => [ ...]  and add the following
'Helper' => App\Helpers\Helper::class, Save and exit the file after this.
<?php // Code within config/app.php

'aliases' => [
        ....
        'Helper' => App\Helpers\Helper::class,
        ....
       ]

 
Step 3
Use it in your Blade template. After the first two steps you now use your custom method (functions) in Laravel’s Blade files
<!-- Code within resources/views/welcome.blade.php -->
@extends('layouts.app')
@section('content')
<div class="container">
    <div class="row">
        <div class="col-md-10 col-md-offset-1">
            <div class="panel panel-default">
                <div class="panel-heading">Welcome</div>

                <div class="panel-body">
                    Your Application's Landing Page.
                    {!! Helper::Uppercase('this is how to use autoloading correctly!!') !!}
                </div>
            </div>
        </div>
    </div>
</div>
@endsection
 
What of if I want to use it in a controller what do I do? With the completions of the first two processes the methods can be used almost anywhere in your Laravel application. To use it in a controller, you need to import the namespace for the class in the controller before using the static method access your static methods.
 
<?php // Code within app/Http/Controllers/SomeController.php

namespace App\Http\Controllers;

use App\Helpers\Helper;

class SomeController extends Controller
{

    public function __construct()
    {
        Helper::uppercase('now i\'m using my helper class in a controller!!');
    }
    ...