Git Product home page Git Product logo

magicmake's Introduction

MAGIC MAKE

Latest Version on Packagist Quality Score Code Quality

Github Workflow Status Total Downloads Licence

A Laravel scaffolding package for an opinionated Laravel coding style.

REQUIREMENTS

  • PHP 7.3+
  • Laravel 8+

STEPS TO INSTALL

composer require ikechukwukalu/magicmake

INIT CLASSES

To initialize prepared classes for a new laravel app.

php artisan magic:init

This would only run when env('APP_ENV') === local and env(MAGIC_INIT_LOCK) === false.

MODEL BASED CLASSES

To generate all model based prepared classes.

php artisan magic:model UserKyc

To generate individual model based prepared classes.

php artisan magic:contract UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:repository UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:service UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:controller UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:createRequest UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:updateRequest UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:deleteRequest UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:readRequest UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:api UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:test UserKyc --variable=userKyc --underscore=user_kyc

php artisan magic:factory UserKyc --variable=userKyc --underscore=user_kyc

Note

Add this to config/api.php.

    'paginate' => [
        ...
        'user_kyc' => [
            'pageSize' => 10,
        ],
    ],

Add this to app/Providers/RepositoryServiceProvider.php.

use App\Contracts\UserKycRepositoryInterface;
use App\Repositories\UserKycRepository;


public function register(): void
{
    ...
    $this->app->bind(UserKycRepositoryInterface::class, UserKycRepository::class);
}

FINISHING SETUP

If you did run php artisan magic:init.

Add to the composer.json file.

"autoload": {
    "psr-4": {
        "App\\": "app/",
        "Database\\Factories\\": "database/factories/",
        "Database\\Seeders\\": "database/seeders/"
    },
    "files": [
        "app/Http/Helpers.php"
    ]
},

After that run:

composer dump-autoload

Add to the config/app.php.

/*
    * Package Service Providers...
    */
App\Providers\MacroServiceProvider::class,
App\Providers\RepositoryServiceProvider::class,

Add to app/Http/Kernel.php in protected $middlewareAliases

protected $middlewareAliases = [
    ....
    'check.email.verification' => \App\Http\Middleware\CheckEmailVerification::class,
]

Project setup

php artisan ui bootstrap
npm install
composer install
php artisan migrate --seed

Run development server

npm run build
php artisan serve
php artisan test

LICENSE

The MM package is a software licensed under the Apache 2.0 license.

magicmake's People

Contributors

monitecture avatar

Watchers

Ikechukwu avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.