Skip to content

Commit 5c12a21

Browse files
committed
feat(view): Create default app view and update routing
- Added a new Blade template for the default application view. - Updated the web routes to render the new view for the root and catch-all routes.
1 parent 7ed2885 commit 5c12a21

2 files changed

Lines changed: 22 additions & 1 deletion

File tree

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>DotCMS Laravel</title>
7+
<link rel="stylesheet" href="{{ asset('css/app.css') }}">
8+
</head>
9+
<body>
10+
<div id="app">
11+
<h1>Welcome to DotCMS Laravel</h1>
12+
<p>This is the default view for all routes.</p>
13+
<p>Current URL Path: {{ request()->path() }}</p>
14+
</div>
15+
</body>
16+
</html>

examples/dotcms-laravel/routes/web.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,10 @@
33
use Illuminate\Support\Facades\Route;
44

55
Route::get('/', function () {
6-
return view('welcome');
6+
return view('app'); // Change 'app' to your desired view name
77
});
8+
9+
// Catch-all route for rendering all paths with the same view
10+
Route::get('{any}', function () {
11+
return view('app'); // Change 'app' to the view you want to render
12+
})->where('any', '.*'); // Regex to match everything

0 commit comments

Comments
 (0)