laravel running

This commit is contained in:
2026-07-02 15:52:13 +02:00
parent 2c6eda0db9
commit 5c667fd1cf
62 changed files with 12937 additions and 0 deletions
@@ -0,0 +1,17 @@
<?php
namespace App\Domains\Dashboard\Controllers;
use App\Providers\InertiaProvider;
use Illuminate\Http\Request;
use Inertia\Inertia;
use Inertia\Response;
class DashboardController
{
public function __invoke(Request $request): Response
{
$inertiaProvider = new InertiaProvider('Dashboard/Dashboard', []);
return $inertiaProvider->render();
}
}
+3
View File
@@ -0,0 +1,3 @@
<?php
use Illuminate\Support\Facades\Route;
+6
View File
@@ -0,0 +1,6 @@
<?php
use App\Domains\Dashboard\Controllers\DashboardController;
use Illuminate\Support\Facades\Route;
Route::get('/', DashboardController::class)->name('dashboard');
+12
View File
@@ -0,0 +1,12 @@
<script setup>
import AppLayout from '@/layouts/AppLayout.vue'
import { ref } from 'vue'
const message = ref('Hallo Welt')
</script>
<template>
<AppLayout title="Dashboard">
<h2>{{ message }}</h2>
</AppLayout>
</template>
+8
View File
@@ -0,0 +1,8 @@
<?php
namespace App\Http\Controllers;
abstract class Controller
{
//
}
+31
View File
@@ -0,0 +1,31 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Illuminate\Notifications\Notifiable;
class User extends Authenticatable
{
use HasFactory, Notifiable;
protected $fillable = [
'name',
'email',
'password',
];
protected $hidden = [
'password',
'remember_token',
];
protected function casts(): array
{
return [
'email_verified_at' => 'datetime',
'password' => 'hashed',
];
}
}
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Providers;
use Illuminate\Support\Facades\URL;
use Illuminate\Support\ServiceProvider;
class AppServiceProvider extends ServiceProvider
{
public function register(): void
{
//
}
public function boot(): void
{
URL::forceScheme('https');
}
}
+30
View File
@@ -0,0 +1,30 @@
<?php
namespace App\Providers;
use App\Models\Tenant;
use App\Models\User;
use App\Resources\UserResource;
use Inertia\Inertia;
use Inertia\Response;
final class InertiaProvider
{
private string $vueFile;
private array $props;
private ?User $user;
public function __construct(string $vueFile, array $props) {
$this->user = auth()->user();
$this->vueFile = $vueFile;
$this->props = $props;
}
public function render() : Response {
return Inertia::render(
str_replace('/', '/Views/', $this->vueFile),
$this->props
);
}
}