Merge pull request 'BE.larvel-8-test' (#37) from BE.larvel-8-test into dev
Reviewed-on: WillaEngine-Project/WillaEngine#37UI.notification-modules-changes
commit
7e8a875127
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,34 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
return [
|
||||||
|
|
||||||
|
/*
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
| Cross-Origin Resource Sharing (CORS) Configuration
|
||||||
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
||||||
|
| Here you may configure your settings for cross-origin resource sharing
|
||||||
|
| or "CORS". This determines what cross-origin operations may execute
|
||||||
|
| in web browsers. You are free to adjust these settings as needed.
|
||||||
|
|
|
||||||
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
||||||
|
|
|
||||||
|
*/
|
||||||
|
|
||||||
|
'paths' => ['api/*'],
|
||||||
|
|
||||||
|
'allowed_methods' => ['*'],
|
||||||
|
|
||||||
|
'allowed_origins' => ['*'],
|
||||||
|
|
||||||
|
'allowed_origins_patterns' => [],
|
||||||
|
|
||||||
|
'allowed_headers' => ['*'],
|
||||||
|
|
||||||
|
'exposed_headers' => [],
|
||||||
|
|
||||||
|
'max_age' => 0,
|
||||||
|
|
||||||
|
'supports_credentials' => false,
|
||||||
|
|
||||||
|
];
|
@ -0,0 +1,32 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
use Illuminate\Database\Migrations\Migration;
|
||||||
|
use Illuminate\Database\Schema\Blueprint;
|
||||||
|
use Illuminate\Support\Facades\Schema;
|
||||||
|
|
||||||
|
class CreateCacheTable extends Migration
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* Run the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function up()
|
||||||
|
{
|
||||||
|
Schema::create('cache', function (Blueprint $table) {
|
||||||
|
$table->string('key')->unique();
|
||||||
|
$table->mediumText('value');
|
||||||
|
$table->integer('expiration');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reverse the migrations.
|
||||||
|
*
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
public function down()
|
||||||
|
{
|
||||||
|
Schema::dropIfExists('cache');
|
||||||
|
}
|
||||||
|
}
|
@ -1,60 +1,55 @@
|
|||||||
<?php
|
<?php
|
||||||
|
|
||||||
/**
|
use Illuminate\Contracts\Http\Kernel;
|
||||||
* Laravel - A PHP Framework For Web Artisans
|
use Illuminate\Http\Request;
|
||||||
*
|
|
||||||
* @package Laravel
|
|
||||||
* @author Taylor Otwell <taylor@laravel.com>
|
|
||||||
*/
|
|
||||||
|
|
||||||
define('LARAVEL_START', microtime(true));
|
define('LARAVEL_START', microtime(true));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Register The Auto Loader
|
| Check If Application Is Under Maintenance
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Composer provides a convenient, automatically generated class loader for
|
| If the application is maintenance / demo mode via the "down" command we
|
||||||
| our application. We just need to utilize it! We'll simply require it
|
| will require this file so that any prerendered template can be shown
|
||||||
| into the script here so that we don't have to worry about manual
|
| instead of starting the framework, which could cause an exception.
|
||||||
| loading any of our classes later on. It feels great to relax.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
require __DIR__.'/../vendor/autoload.php';
|
if (file_exists(__DIR__.'/../storage/framework/maintenance.php')) {
|
||||||
|
require __DIR__.'/../storage/framework/maintenance.php';
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Turn On The Lights
|
| Register The Auto Loader
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| We need to illuminate PHP development, so let us turn on the lights.
|
| Composer provides a convenient, automatically generated class loader for
|
||||||
| This bootstraps the framework and gets it ready for use, then it
|
| this application. We just need to utilize it! We'll simply require it
|
||||||
| will load up this application so that we can run it and send
|
| into the script here so we don't need to manually load our classes.
|
||||||
| the responses back to the browser and delight our users.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$app = require_once __DIR__.'/../bootstrap/app.php';
|
require __DIR__.'/../vendor/autoload.php';
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
| Run The Application
|
| Run The Application
|
||||||
|--------------------------------------------------------------------------
|
|--------------------------------------------------------------------------
|
||||||
|
|
|
|
||||||
| Once we have the application, we can handle the incoming request
|
| Once we have the application, we can handle the incoming request using
|
||||||
| through the kernel, and send the associated response back to
|
| the application's HTTP kernel. Then, we will send the response back
|
||||||
| the client's browser allowing them to enjoy the creative
|
| to this client's browser, allowing them to enjoy our application.
|
||||||
| and wonderful application we have prepared for them.
|
|
||||||
|
|
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
|
$app = require_once __DIR__.'/../bootstrap/app.php';
|
||||||
|
|
||||||
$response = $kernel->handle(
|
$kernel = $app->make(Kernel::class);
|
||||||
$request = Illuminate\Http\Request::capture()
|
|
||||||
);
|
|
||||||
|
|
||||||
$response->send();
|
$response = tap($kernel->handle(
|
||||||
|
$request = Request::capture()
|
||||||
|
))->send();
|
||||||
|
|
||||||
$kernel->terminate($request, $response);
|
$kernel->terminate($request, $response);
|
||||||
|
@ -1,19 +0,0 @@
|
|||||||
<?php
|
|
||||||
|
|
||||||
namespace Tests\Unit;
|
|
||||||
|
|
||||||
use Tests\TestCase;
|
|
||||||
use Illuminate\Foundation\Testing\RefreshDatabase;
|
|
||||||
|
|
||||||
class ExampleTest extends TestCase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* A basic test example.
|
|
||||||
*
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
public function testBasicTest()
|
|
||||||
{
|
|
||||||
$this->assertTrue(true);
|
|
||||||
}
|
|
||||||
}
|
|
Loading…
Reference in new issue