Download the PHP package stats4sd/laravel-sql-views without Composer

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

SqlViews

Latest Version on Packagist Total Downloads StyleCI

A small package to help automate the creation and updating of MySQL views and procedures.

This package lets you store the query definition for every MySQL view and stored procedure you need within your Laravel codebase, and lets you edit the SQL query strings directly instead of using migration files. This is useful when:

Installation

Via Composer

Usage

The package includes a single console command php artisan updatesql. This command does 2 things:

  1. It will create or update the SQL views in your database based on the files within your database/views directory. It will create a view for every .sql file it finds, using the filename as the view name and the contents as the query definition.
  2. It will create or update SQL procedures in your database based on the files within your database/procedures directory. It will run all .sql files in that directly verbatim. The intention is that you would include scripts to create the required procedures, but in theory you could include any SQL code that you want to run on a regular basis.

To use:

  1. Place your query definitions within .sql files inside your database/views directory. You need 1 file per view. Do not include the "CREATE OR REPLACE VIEW" segment, just include the query definition itself.
  2. Place any additional SQL scripts you want to run, e.g. to create stored procedures, into the database/procedures folder.
  3. Run the command with php artisan updatesql.

It will search the folders recursively, so you can organise your views into subfolders if you wish.

The packge comes with a tiny config file.

To disable the automatic creation of either the database/views and/or database/procedures folder(s) you can add the following .env variables :-

Please note that disabling folder creation without a good understanding of this package will cause you issues.

Change log

Please see the changelog for more information on what has changed recently.

Contributing

Please see contributing.md for details and a todolist.

Security

If you discover any security related issues, please email author email instead of using the issue tracker.

Credits

License

MIT license. Please see the license file for more information.


All versions of laravel-sql-views with dependencies

PHP Build Version
Package Version
No informations.
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 stats4sd/laravel-sql-views contains the following files

Loading the files please wait ....