Download the PHP package daxter1987/laravel-env without Composer

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

daxter1987/laravel-env

By installing this composer package into your laravel application, this enables the php artisan dax:install command, which creates a docker-compose.yml and a daxenv.sh file into your laravel root directory. Then you can run docker compose up -d and you have a laravel environment with a database.

Requirements

  1. Must have docker installed
  2. Must have docker-compose installed

Installation

1. Install using composer by running:

2. Once installed run the command

This creates 2 files:

  1. docker-compose.yml: compose file with 2 containers
    1. Ubuntu image with nginx and Php 7.3
    2. Database image
  2. daxenv.sh: file with useful shortcuts to run your environment

This also checks the .gitignore in your laravel project and adds the line /db if it doesn't exist. This is the folder where docker will store your local database container volume.

3. [Optional but recommended] Give the daxenv.sh execute permissions

If you want to use the shortcuts give the daxenv.sh file executing permissions by running the command:

4. Configure database

The database connection credentials can be found in your newly created docker-compose.yml file. Make sure the database connection is properly configured either in your .env file or your config/database.php file.

Usage

With shortcuts

To start the environment run

To stop the environment

To ssh into the laravel container

Without shortcuts

To start the environment run

To stop the environment

To ssh into the laravel container run docker container ls to get the name of the container, then replace the container name for CONTAINER_NAME in the command below

xdebug and PHPStorm

Setup

The container comes with xdebug installed (if you run phpinfo() you would see the configuration). To use it, set up PHPStorm:

  1. Go to Languages and Frameworks > PHP > Servers and set

    • Name: Name of project
    • Host: localhost
    • Port: 8080
    • Debugger Xdebug
    • Use path mappings = true
    • Set Absolute path on server /var/www/html
  2. Go to "Add Configurations"
    • Click +
    • Select PHP remote Debug template
      • Name: Name of project
      • Server: previously created server
      • IDE key: PHPSTORM
    • Click Apply

Run


All versions of laravel-env 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 daxter1987/laravel-env contains the following files

Loading the files please wait ....