Giter Club home page Giter Club logo

snugger's Introduction

Snugger

Snugger is a starterkit for Slim Framework projects

Included:

Adding a controller

Adding a route

Database migrations with Phinx

create a new migration:

$ vendor/bin/phinx create AddNameToUsersTable

Edit the file /database/migrations/add_name_to_users_table.php to up() and down() change the database. Use the Laravel Schema definitions.

Execute a migration to the last version:

$ vendor/bin/phinx migrate

Go back one step:

$ vendor/bin/phinx rollback

Go back to the start

$ vendor/bin/phinx rollback -t 0

MigrationStub.php is the template file, Migration.php is the base-class file.

TODO

Open for improvement:

  • Improve readme
    • how to add controllers
    • explain how to add routes
  • improve bootstrap/app.php by better separating code to files or maybe even use some class system.
  • increase number of tested units
  • End to end test
  • Some files are attached to the app with require_once wich is a bit messy. IDE's don't like this and code-completion fails. Maybe change this into a class hierarchy?
  • Gut feeling says that the use of the container-array can be changed to a strong-typed system with interfaces (implements IClass)?

Thank you

Snugger is partly based on the YouTube tutorials of Codecourse https://www.youtube.com/user/phpacademy/featured.

See https://codecourse.com/.

snugger's People

Contributors

johnmidity avatar

Watchers

James Cloos avatar  avatar

snugger's Issues

Per route CSRF

Because in the current setup the CSRF is running on all routes, it is not possible to call the API. To solve this, a per-route CSRF should be made possible and then the CSRF can be off for API routes.

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.