Download the PHP package crocodicstudio/cbmodel without Composer

On this page you can find all versions of the php package crocodicstudio/cbmodel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package cbmodel

CB Laravel Model Repository

An alternative about laravel eloquent

This Package Is Deprecated

Please use https://github.com/crocodic-studio/laravel-model

Requirement

Laravel 5. | 6. | 7.*

Install Command

composer require crocodicstudio/cbmodel=^2.0

1. Create a model

Create a model from a table
php artisan create:model foo_bar_table

Create model for all tables
php artisan create:model

Create a model with other connection
php artisan create:model foo_bar_table --connection=con2

I assume that you have a table with the structure like bellow:

It will auto create a new file at with the following file structure :

2. Using CB Model class on your Controller

Insert at top of your controller class name.

3. Using CB Model class that has a relation

I assume you have a table for book relation like bellow :

and your book structure to be like bellow:

Now you have to create a model for table, you can following previous steps.

I assume that you have create a model, so make sure that now we have two files in the

Open the Books model , and add this bellow method

Then open the FooController

As you can see now we can get the category name by using without any SQL Query or even Database Builder syntax. Also you can recursively go down to your relation with NO LIMIT.

4. How to Casting DB Builder Collection output to CB Model Class?

You can easily cast your simple database builder collection to cb model class.

5. How to insert the data with CB Model

You can easily insert the data with method like bellow:

Then if you want to get the last insert id you can do like bellow:

5. How to update the data with CB Model

You can easily update the data, just find it for first :

5. How to delete the data?

You can easily delete the data, just find it for first :

or

Model Method Available

A One-To-Many Relationship

A One-To-One Relationship

Other Useful

  1. CRUDBooster Laravel CRUD Generator

All versions of cbmodel with dependencies

PHP Build Version
Package Version
Requires php Version ~7.2|~7.3
doctrine/dbal Version ^2.10
illuminate/support Version ^5.7|^6.0|^7.0
illuminate/console Version ^5.7|^6.0|^7.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package crocodicstudio/cbmodel contains the following files

Loading the files please wait ....