PHP code example of unckleg / laravel-helpers

1. Go to this page and download the library: Download unckleg/laravel-helpers library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

unckleg / laravel-helpers example snippets


composer 

...
Unckleg\Helpers\HelpersServiceProvider::class,

php artisan make:helper Hello --type=View



namespace App\Helpers;

class Test
{
    /**
     *
     * Blade calling: @test::helloWorld()
     *
     * @return string
     */
    public function helloWorld()
    {
        return 'Hello world';
    }

    /**
     *
     * Blade calling: @test::helloTo(array $people)
     *
     * @param  array  $people
     * @return string
     */
    public function helloTo(array $people)
    {
        return implode(', ', $people);
    }
    
    /**
     * 
     * Blade calling: @test::navigation()
     *
     * @return string   
     */
    public static function navigation() 
    { 
        $pages = App\Page::all();