Download the PHP package anthonyedmonds/laravel-mysqlite without Composer

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

Laravel MySqlite

Generate MySQL and SQLite3 expressions on the fly based on the active database.

Designed primarily for situations where an SQLite3 database is used for testing, but MySQL is used for production.

Calling the MySqlite:: helper will provide the correct syntax for the default database connection.

Installation

  1. Install via Composer: composer require anthonyedmonds/laravel-mysqlite
  2. Use in your code: use AnthonyEdmonds\LaravelMySqlite\MySqlite

Usage

Laravel MySqlite provides syntax for the following MySQL/SQLite conversions:

MySqlite Method MySQL Syntax SQLite Syntax Notes
MySqlite::cast() CAST() CAST() Must be a value from MySqlite::CASTS_MYSQL
MySqlite::concat() CONCAT() \|\| Pass literal strings with quotation marks, such as '"String"'
MySqlite::day() DAY() STRFTIME()
MySqlite::dateFormat() DATE_FORMAT() STRFTIME() Use date formats supported by both MySQL and SQLite
MySqlite::disableForeignKeys() SET FOREIGN_KEY_CHECKS=0 PRAGMA foreign_keys = 0
MySqlite::enableForeignKeys() SET FOREIGN_KEY_CHECKS=1 PRAGMA foreign_keys = 1
MySqlite::hour() HOUR() STRFTIME()
MySqlite::jsonUnquote() JSON_UNQUOTE() TRIM(") Performs a trim on qutoation marks
MySqlite::month() MONTH() STRFTIME()
MySqlite::setAutoIncrement() ALTER TABLE... UPDATE sqlite_sequence... Used as a standalone statement
MySqlite::trim() TRIM() TRIM(), LTRIM(), RTRIM() Pass literal strings with quotation marks, such as '"String"'
MySqlite::year() YEAR() STRFTIME()

The helper returns an Expression with custom __toString behaviour, so you may use it directly inside queries:

Columns

The column/columns value of a method accepts a string/array of:

Aliasing / As

The optional $as parameter adds a column alias when set:

MySqlite::hour('users.created_at', 'potato') === HOUR(users.created_at) AS potato

Roadmap

There are more syntax differences between MySQL and SQLite that can be compensated for with minor syntax changes, which will be added as they are encountered.

If you require a particular method conversion, raise an issue.


All versions of laravel-mysqlite with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/support Version ^11
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 anthonyedmonds/laravel-mysqlite contains the following files

Loading the files please wait ....