1. Go to this page and download the library: Download lowel/laravel-service-maker 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/ */
lowel / laravel-service-maker example snippets
use App\Services\Payment\PaymentServiceInterface;
use App\Repositories\User\UserRepositoryInterface;
use Illuminate\Support\Facades\App;
// Using app() helper
$service = app(PaymentServiceInterface::class);
$repository = app(UserRepositoryInterface::class);
// Using App facade
$service = App::make(PaymentServiceInterface::class);
// Using constructor injection
public function __construct(
PaymentServiceInterface $paymentService,
UserRepositoryInterface $userRepository
) {
// ...
}