Fix /notes/new page so it is not a 404

This commit is contained in:
Jonny Barnes 2022-08-13 16:00:06 +01:00
parent 8817ff1719
commit 5e5f74f4ed
Signed by: jonny
SSH key fingerprint: SHA256:CTuSlns5U7qlD9jqHvtnVmfYV3Zwl2Z7WnJ4/dqOaL8
3 changed files with 20 additions and 0 deletions

View file

@ -83,4 +83,16 @@ class NotesController extends Controller
return view('notes.tagged', compact('notes', 'tag'));
}
/**
* Page to create a new note.
*
* Dummy page for now.
*
* @return View
*/
public function create(): View
{
return view('notes.create');
}
}

View file

@ -0,0 +1,7 @@
@extends('master')
@section('title')New Note « @stop
@section('content')
<p>This was a page where I could create new notes. maybe it will be again one day…</p>
@stop

View file

@ -142,6 +142,7 @@ Route::group(['domain' => config('url.longurl')], function () {
Route::get('/feed.atom', [FeedsController::class, 'notesAtom']);
Route::get('/feed.json', [FeedsController::class, 'notesJson']);
Route::get('/feed.jf2', [FeedsController::class, 'notesJf2']);
Route::get('/new', [NotesController::class, 'create']);
Route::get('/{id}', [NotesController::class, 'show']);
Route::get('/tagged/{tag}', [NotesController::class, 'tagged']);
});