1. Go to this page and download the library: Download ammaraldwayma/laravel-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/ */
namespace App\Repositories;
use App\Repositories\Interfaces\UserRepositoryInterface;
use App\Models\User;
class UserRepository implements UserRepositoryInterface
{
/**
* @param User $user
*/
public function __construct(
protected User $user,
)
{
//
}
}
return [
/*
|--------------------------------------------------------------------------
| Default Namespaces
|--------------------------------------------------------------------------
| Here you can specify the default namespaces for the different types of
| classes that you can generate it by the package.
|
*/
'default_namespaces' => [
'enum' => 'App\Enums',
'trait' => 'App\Traits',
'interface' => 'App\Interfaces',
'service' => 'App\Services',
'repository' => 'App\Repositories',
],
];