mirror of
https://github.com/alexjustesen/speedtest-tracker.git
synced 2026-06-23 07:00:08 +00:00
set filament brand config to site name setting (#297)
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use App\Models\User;
|
||||
use App\Settings\GeneralSettings;
|
||||
use Filament\Facades\Filament;
|
||||
use Filament\Navigation\NavigationItem;
|
||||
use FilamentVersions\Facades\FilamentVersions;
|
||||
@@ -32,6 +33,12 @@ class FilamentServiceProvider extends ServiceProvider
|
||||
return true;
|
||||
});
|
||||
|
||||
try {
|
||||
config(['filament.brand' => app(GeneralSettings::class)->site_name ?? env('APP_NAME')]);
|
||||
} catch (\Throwable $th) {
|
||||
// if this fails it's because the migration doesn't exist so it can be skipped
|
||||
}
|
||||
|
||||
FilamentVersions::addItem('Speedtest Tracker', 'v'.config('speedtest.build_version'));
|
||||
|
||||
Filament::serving(function () {
|
||||
|
||||
@@ -1,39 +0,0 @@
|
||||
<?php
|
||||
|
||||
use Illuminate\Database\Migrations\Migration;
|
||||
use Illuminate\Database\Schema\Blueprint;
|
||||
use Illuminate\Support\Facades\Schema;
|
||||
|
||||
return new class extends Migration
|
||||
{
|
||||
/**
|
||||
* Run the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function up()
|
||||
{
|
||||
Schema::create('cache', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->mediumText('value');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
|
||||
Schema::create('cache_locks', function (Blueprint $table) {
|
||||
$table->string('key')->primary();
|
||||
$table->string('owner');
|
||||
$table->integer('expiration');
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Reverse the migrations.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function down()
|
||||
{
|
||||
Schema::dropIfExists('cache');
|
||||
Schema::dropIfExists('cache_locks');
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user