Added 'no Page URL' notice

Added a notice if a user tries to view their page without having a Page URL set on the User Panel.
This commit is contained in:
Julian Prieber 2022-03-19 18:34:43 +01:00
parent 9cb10aa777
commit 6c81802799
2 changed files with 10 additions and 0 deletions

View File

@ -26,6 +26,10 @@
</div>-->
<div class="form-group col-lg-8">
<?php
$url = $_SERVER['REQUEST_URI'];
if( strpos( $url, "no_page_name" ) == true ) echo '<span style="color:#FF0000; font-size:120%;">You do not have a Page URL</span>'; ?>
<br>
<label>Page URL</label>
<div class="input-group">
<div class="input-group-prepend">

View File

@ -17,6 +17,11 @@ use App\Http\Controllers\UserController;
|
*/
//Redirect if no page URL is set
Route::get('/@', function () {
return redirect('/studio/no_page_name');
});
//Public route
Route::get('/going/{id?}/{link?}', [UserController::class, 'clickNumber'])->where('link', '.*')->name('clickNumber');
Route::get('/+{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
@ -38,6 +43,7 @@ Route::get('/upLink/{up}/{id}', [UserController::class, 'upLink'])->name('upLink
Route::get('/studio/edit-link/{id}', [UserController::class, 'showLink'])->name('showLink');
Route::post('/studio/edit-link/{id}', [UserController::class, 'editLink'])->name('editLink');
Route::get('/studio/page', [UserController::class, 'showPage'])->name('showPage');
Route::get('/studio/no_page_name', [UserController::class, 'showPage'])->name('showPage');
Route::post('/studio/page', [UserController::class, 'editPage'])->name('editPage');
Route::get('/studio/profile', [UserController::class, 'showProfile'])->name('showProfile');
Route::post('/studio/profile', [UserController::class, 'editProfile'])->name('editProfile');