Download the PHP package gbuckingham89/valet-assistant without Composer

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

Valet Assistant

Latest Version on Packagist GitHub Tests Action Status Total Downloads

A Laravel package for using Laravel Valet within another Laravel application - e.g. getting a list of sites served by Valet.

This package will only be fully functional when used on a computer that has Laravel Valet installed.

Looking for a UI for Laravel Valet? Take a look at gbuckingham89/valet-launchpad.

Installation

You can install the package via composer:

You can publish the Laravel config file with:

Usage

Use the Laravel container to resolve a copy of Gbuckingham89\ValetAssistant\ValetAssistant however you feel is best - e.g. dependency injection or via app()->make().

There is also a Facade, Gbuckingham89\ValetAssistant\Facade\ValetAssistant, if that's your preference.

Once you have your instance, you can use the following methods:

Get a list of all the projects served by Laravel Valet:

This returns a Collection of "Project" objects (representing a directory on your local machine). Each Project will have one or more "Site" objects (representing a URL that the project is served under). Take a look at the source code or use auto-completion in your IDE to learn more about the data structure.

Check is Valet is installed (and accessible):

This simply returns a boolean value indicating if Valet is installed, or not.

Troubleshooting

Valet not installed

If you see errors about Valet not being installed (but you're sure that it is, and you see output by running which valet from your local terminal) it's likely that the user running your PHP script doesn't know where the Valet binary is located, or doesn't have permission to run it.

There are two ways to resolve this;

  1. Find the value of the PATH environment variable for your shell by running echo $PATH from your local Terminal. Ensure you have published the config file (see above), then add an entry to your .env file with the key VALET_ASSISTANT_ENV_PATH and the value of your local PATH. This PATH value will then be used whenever this package executes a shell command. It is NOT used by code outside this package.
  2. Add /Users/[local-username]/.composer/vendor/bin to the PATH environment for the user running the PHP script (remember to insert the username that Valet is installed under)

Please do your own research and consider any security implications of giving PHP access to additional directories through the PATH environment.

Testing

You can run the test suite by calling ./vendor/bin/phpunit or composer test.

You may see the following error in your terminal output when running the test suite: ..sh: which: command not found. This is a known issue and a PR to resolve this would certainly be welcomed!

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of valet-assistant with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|^8.0
ext-json Version *
laravel/framework Version ^8.0
spatie/enum Version ^3.11
laravel/valet Version ^2.18
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 gbuckingham89/valet-assistant contains the following files

Loading the files please wait ....