1. Go to this page and download the library: Download web-chefs/laravel-app-spawn library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
web-chefs / laravel-app-spawn example snippets
use Illuminate\Foundation\Testing\TestCase;
use WebChefs\LaraAppSpawn\ApplicationResolver;
class MyTest extends TestCase
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
// Root of my app, used as a fallback for location of /database when
// database.path in config is null.
$appRoutePath = __DIR__;
// Resolve Application
$resolver = ApplicationResolver::makeApp($appRoutePath);
$this->app = $resolver->app();
// Run our database migrations if
use Illuminate\Support\Arr;
use Illuminate\Foundation\Testing\TestCase;
use WebChefs\LaraAppSpawn\ApplicationResolver;
class MyTest extends TestCase
{
/**
* Creates the application.
*
* @return \Illuminate\Foundation\Application
*/
public function createApplication()
{
// Root of my app, used as a fallback for location of /database when
// database.path in config is null.
$appRoutePath = __DIR__;
// Build Resolver config
$config = ApplicationResolver::defaultConfig();
Arr::set($config, 'database.connection', $this->connectionName);
Arr::set($config, 'queue.connection', $this->connectionName);
// Resolve Application
$resolver = ApplicationResolver::makeApp($appRoutePath, $config);
$this->app = $resolver->app();
// Run our database migrations if
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.