Changed correct dashboard route and introduced a stripped down version of the pagesettings helper class from the main CMS codebase, in order to maintain compatability/functionality
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
linter / quality (push) Waiting to run
tests / ci (push) Waiting to run
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
<?php
|
||||
|
||||
namespace App\Helpers;
|
||||
|
||||
class PageSettingsHelper
|
||||
{
|
||||
public static function pageSettings(): array {
|
||||
return config('standard-pagesettings.defaults');
|
||||
}
|
||||
|
||||
public static function get(string $key): string {
|
||||
// Get first result from database
|
||||
$settings = config('standard-pagesettings.defaults');
|
||||
return $settings[$key];
|
||||
}
|
||||
}
|
||||
@@ -46,6 +46,6 @@ class RegisteredUserController extends Controller
|
||||
|
||||
Auth::login($user);
|
||||
|
||||
return to_route('dashboard');
|
||||
return to_route('page-builder.index');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,22 +3,30 @@
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
use Inertia\Inertia;
|
||||
|
||||
use App\Helpers\PageSettingsHelper;
|
||||
|
||||
class AppServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*/
|
||||
public function register(): void
|
||||
{
|
||||
public function register(): void {
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Bootstrap any application services.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
//
|
||||
public function boot(): void {
|
||||
Inertia::share([
|
||||
'pageSettings' => function () {
|
||||
return PageSettingsHelper::pageSettings();
|
||||
},
|
||||
'siteName' => function () {
|
||||
return config('app.name');
|
||||
},
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user