PHP code example of thunder-birds-studio / laravel-helpers

1. Go to this page and download the library: Download thunder-birds-studio/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/ */

    

thunder-birds-studio / laravel-helpers example snippets


class FooController
{
    /**
     * @var FooService
     */
    protected $foo_service;
    
    /**
     * @param FooService $foo_service
     */
    public function __construct(FooService $foo_service)
    {
        $this->foo_service = $foo_service;
    }
    
    /**
     * @param int $foo_id
     */
    public function bar($foo_id)
    {
        $this->foo_service->bar($foo_id);
    }
    
    /**
     * @param FooModel $foo
     */
    public function barz(FooModel $foo)
    {
        $this->foo_service->bar($foo);
    }
}