Download the PHP package owenmelbz/sashimi without Composer

On this page you can find all versions of the php package owenmelbz/sashimi. 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 sashimi

Sashimi 🍣

Eloquent's missing "array" driver.

Sometimes you want to use Eloquent, but without dealing with a database.

Important Notice

This is a fork of https://github.com/calebporzio/sushi - however it allows you to run Sushi without having a full Laravel installation, allowing you to pull it into other frameworks, it's 90% Celebs code, with additional work-arounds to avoid core Laravel features such as the IoC Container, and global helpers.

Install

Use

Using this package consists of two steps:

  1. Add the \Sashimi\Sushi trait to a model.
  2. Add a $rows property to the model.

That's it.

Now, you can use this model anywhere you like, and it will behave as if you created a table with the rows you provided.

This is really useful for "Fixture" data, like states, countries, zip codes, user_roles, sites_settings, etc...

Relationships

Let's say you created a Role model, based on an array using Sushi, that looked like this:

You can add a relationship to another standard model, just like you normally would:

Assuming the users table has a role_id column, you can do things like this:

Note: There is one caveat when dealing with Sushi model relationships. The whereHas method will NOT work. This is because the two models are spread across two separate databases.

Custom Schema

If Sushi's schema auto-detection system doesn't meet your specific requirements for the supplied row data, you can customize them with the $schema property or the getSchema() method.

How It Works

Under the hood, this package creates and caches a SQLite database JUST for this model. It creates a table and populates the rows. If, for whatever reason, it can't cache a .sqlite file, it will default to using an in-memory sqlite database.

Using ->getRows()

You can optionally opt out of using the protected $rows property, and directly implement your own getRows() method.

This will allow you to determine the rows for the model at runtime. You can even generate the model's rows from an external source like a third-party API.

Note: If you choose to use your own ->getRows() method, the rows will NOT be cached between requests.


All versions of sashimi with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3
illuminate/database Version ^5.8 || ^6.0 || ^7.0
illuminate/support Version ^5.8 || ^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 owenmelbz/sashimi contains the following files

Loading the files please wait ....