Giter Site home page Giter Site logo

happy's Introduction

Happy

Happy Package for Api creation

Installation

composer require ezamlinux/happy

add the following in your config/app.php

'providers' => [
    // Others Providers
    Happy\Providers\ServiceProvider::class,
]

Command

php artisan happy:init

create user and oauth token

php artisan happy:key

create ouath token for user

php artisan happy:model

Act like this command : php artisan make:model Robot --api --factory --migration but store inside an Http\Api directory

php artisan happy:route

generate route in json file ( for JS purpose, see publishable/route.js)

Trait

Trait for automating test in api context (CRUD operation with excepted response) based on Route::apiResource() method

see Console/Commands/stubs/test for example file (would be automated soon)`

use Factory so make it good

Exemple php artisan test :

routes/api.php
Route::apiResource('human', 'HumanController');

//
PASS Tests\Api\HumanTest
✓ index // 200 Ok
✓ store // 201 Created
✓ show // 200 Ok
✓ update // 200 Ok
✓ update unknow // 404 Not Found
✓ delete // 204 No content
✓ delete twice // 404 Not Found

Publish

config file

route.js : JavaScript route() helper

Todo

Better configuration and advanced fonctionnality Better database clean after test

happy's People

Contributors

ezamlinux avatar

Watchers

 avatar  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.