Coder Social home page Coder Social logo

yepwoo / laragine Goto Github PK

View Code? Open in Web Editor NEW
41.0 5.0 6.0 748 KB

Laravel Engine: Develop Faster And Cleaner!

Home Page: https://yepwoo.com/products/laragine/docs/v2/introduction

License: MIT License

PHP 92.93% Blade 7.07%
laravel module crud unittesting php crud-generator api-generator laravel-crud-api laravel-crud-generator laravel-package

laragine's People

Contributors

abdlrahmansaberabdo avatar mahmoodahmad100 avatar musoftware avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

laragine's Issues

adding an example of using Pagination in the docs

  • we need to add an example of how to use the Pagination in the docs, but at the time being you can check the following:

return $this->sendResponse($this->resource::collection($this->model->paginate(30))->response()->getData(true));

Local variables should not have the same name as class fields

  • we need to update the $json variable to be something like $current_json in src/Core/Module/UnitTest.stub (testItShouldGetListingOfTheResource() method)

  • the same thing as above, $model should be something like $current_model in src/Core/Base/ApiController.stub (update() and destroy() methods)

reference:
https://wiki.sei.cmu.edu/confluence/display/c/DCL01-C.+Do+not+reuse+variable+names+in+subscopes
https://wiki.sei.cmu.edu/confluence/display/java/DCL51-J.+Do+not+shadow+or+obscure+identifiers+in+subscopes

source of issues mentioned was:
SonarQube

minor changes on the unit output

please @AbdlrahmanSaberAbdo solve the following (I have created an unit called Comment):

  • Core\Blog\Controllers\API\V1\CommentApiController.php => Core\Blog\Controllers\API\V1\CommentController.php (remove Api from the file name)

  • Core\Blog\Controllers\Web\CommentWebController.php => Core\Blog\Controllers\Web\CommentController.php (remove Web from the file name)

  • in Core\Blog\database\migrations\create_comments_table.php:
    class Create#UNIT_NAME_PLURAL#Table extends Migration => class CreateCommentsTable extends Migration (replace #UNIT_NAME_PLURAL# with Comments)

update README.md

update README.md to include the description, features, docs ...etc

Unit changes

  • First, change unit implementation, the unit should have an option called --init to make the main files first

  • Main files

    • Web controller
    • API controller
    • Create JSON file
    • Model
  • ** Unit command without init option **

    • First, we'll look if the user runs the command with init or not
    • If not will ask him if he'd like to run it to can create the main file
  • In case he runs the init command

    • will get the attributes from the JSON file then we'll create the other files
    • Resources
    • Requests
    • Migration
    • Tests
    • Factory

Create override method

When trying to override files the mkdir function return error, so we should make another method for override files.

Step:

  • Check if the folder exists or not
  • If the folder exists, check if the specified file exists or not, if it exists override it, if not create a new one
  • If the folder does not exist will create a new one then create a file.
  • I think we'll use file_put_contents method to do that

Notes:

  • The folder or file might not exist because might be the user have already created a file called core in his/her project

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.