PHPackages                             giliweb/phusky - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Framework](/categories/framework)
4. /
5. giliweb/phusky

ActiveLibrary[Framework](/categories/framework)

giliweb/phusky
==============

Basic PHP model framework

015PHP

Since Sep 8Pushed 9y ago1 watchersCompare

[ Source](https://github.com/giliweb/phusky)[ Packagist](https://packagist.org/packages/giliweb/phusky)[ RSS](/packages/giliweb-phusky/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

[![](https://github.com/giliweb/phusky/raw/master/logo.png)](https://github.com/giliweb/phusky/raw/master/logo.png)

#### This guide is not yet completed

[](#this-guide-is-not-yet-completed)

### Table of Contents

[](#table-of-contents)

- [Installation Instructions](#installation-instructions)
- [Create a new object and insert into DB](#create-a-new-object-and-insert-into-db)
- [Update operation](#update-operation)
- [Delete](#delete)
- [TODO](#todo)

Installation Instructions
-------------------------

[](#installation-instructions)

Run:

```
composer require giliweb/phusky

```

Open composer.json and add

```
"scripts": {
    "phusky_setup": "giliweb\\phusky\\Install::init"
}

```

Run

```
composer phusky_setup -- -path=classes_folder -dbhost=db_host -dbname=db_name -dbuser=db_user -dbpassword=db_password

```

Phusky will now create a set of PHP classes inside the folder you indicated in the -path parameter

How to use Phusky for your project:

Create a new object and insert into DB
--------------------------------------

[](#create-a-new-object-and-insert-into-db)

All of the following examples are based on the data available in the "example\_db.sql"

Ok, let's say we want to insert in our DB a new Car object. Model's name is "Testarossa" and we already know the brand's ID is 3:

```
