PHP code example of cwccode / laravel-contracts

1. Go to this page and download the library: Download cwccode/laravel-contracts 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/ */

    

cwccode / laravel-contracts example snippets




namespace App\Contracts;

interface InterfaceName
{
    //
}



namespace App\Contracts;

interface InterfaceName
{
    /**
     * method1
     *
     * @return void
     */
    public function method1();

    /**
     * method2
     *
     * @return void
     */
    public function method2();
}
bash
php artisan make:contract InterfaceName
bash
php artisan make:contract InterfaceName --method=method1 --method=method2