/nette-model

The missing Abstract Model in Nette framework without dependency (external) but with power, flexibility & features you would love to use so much. @nette

Primary LanguagePHPMIT LicenseMIT

nette-model

The missing Abstract Model in Nette framework without dependency (external) but with power, flexibility & features you would love to use so much. @nette

Give us a star, it makes us so happy. Thanks ⭐.️
Or contribute with bug report/error-reporting/feature-request/your-thoughts.

Table of contents

Installation

The prefered method of installation is using composer. Don't have yet? Install & you will love using it hopefully. Install composer from here:

https://getcomposer.org/

Download this package using composer:

composer require farhanianz/nette-model

You are good to go. It uses nette/database. If you are connected to database with your nette framework official packages, go & write some models.

In case, if you don't know how to configure nette database, head over here:

Features

  • Basic Finders (Read)
  • Manipulators (Create, Update, Delete)
  • Soft Delete Behavior.
  • Timestamps Behavior (Keeps track of created_at & updated_at automatically)
  • Overright behaviors at any point.
  • A handful of customization/control variables.
  • 1:1, 1:Many relationships
  • No SQL Injection (Auto Escaping).
  • Auto-detects table name based on model class.
  • Pagination, Sorting & Much more.
  • You get active row with finders, so manipulate any time.
  • All features of nette database core & explorer available at any point.

Principlals

  • Well documented codes.
  • Hassle free usage.
  • Uses only nette components.
  • Keep it minimal but most usable.
  • Extended facilities with minimum impact.

Todo:

  • Advanced Finders.
  • Entity Support.

Documentation

Coming soon: untill then you can browse the codes, it's documented at it's best.

NB:

  • Create an issue for feature request.
  • Write your thoughts on it by creating issue.
  • Inspired From Codeignitet 4.

Additional Note:

  • Contributions are highly welcome & needed.
  • Even if an bug report, feature request, doc writing or anything is appriciated.
  • I spent my times on it, kindly do a little in favor of making the library more usuable & powerful.