Skip to content

Commit

Permalink
setup
Browse files Browse the repository at this point in the history
  • Loading branch information
spawnia committed Jun 26, 2024
1 parent b239ab9 commit 24ee18b
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 11 deletions.
19 changes: 19 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,25 @@

**An example project using [nuwave/lighthouse](https://github.com/nuwave/lighthouse).**

## Setup

```shell
composer install
cp .env.example .env
touch database/database.sqlite
php artisan migrate
```

## Usage

Run the server with the following command:

```shell
php artisan serve
```

Access [the GraphiQL UI](https://github.com/graphql/graphiql/blob/main/packages/graphiql/README.md) at `/graphiql`.

</div>

## Minimalism
Expand Down
5 changes: 0 additions & 5 deletions bootstrap/providers.php

This file was deleted.

6 changes: 0 additions & 6 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,6 @@
"@php artisan package:discover --ansi",
"@ide-helper"
],
"post-root-package-install": [
"@php -r \"file_exists('.env') || copy('.env.example', '.env');\""
],
"post-create-project-cmd": [
"@php artisan key:generate --ansi"
],
"ide-helper": [
"@php artisan ide-helper:generate",
"@php artisan ide-helper:meta",
Expand Down
29 changes: 29 additions & 0 deletions database/migrations/0001_01_01_000001_create_cache_table.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

return new class extends Migration
{
public function up(): void
{
Schema::create('cache', function (Blueprint $table): void {
$table->string('key')->primary();
$table->mediumText('value');
$table->integer('expiration');
});

Schema::create('cache_locks', function (Blueprint $table): void {
$table->string('key')->primary();
$table->string('owner');
$table->integer('expiration');
});
}

public function down(): void
{
Schema::dropIfExists('cache');
Schema::dropIfExists('cache_locks');
}
};

0 comments on commit 24ee18b

Please sign in to comment.