Skip to content

Commit 6c81802

Browse files
committed
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.
1 parent 9cb10aa commit 6c81802

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

resources/views/studio/page.blade.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,10 @@
2626
</div>-->
2727

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

routes/web.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,11 @@
1717
|
1818
*/
1919

20+
//Redirect if no page URL is set
21+
Route::get('/@', function () {
22+
return redirect('/studio/no_page_name');
23+
});
24+
2025
//Public route
2126
Route::get('/going/{id?}/{link?}', [UserController::class, 'clickNumber'])->where('link', '.*')->name('clickNumber');
2227
Route::get('/+{littlelink}', [UserController::class, 'littlelink'])->name('littlelink');
@@ -38,6 +43,7 @@
3843
Route::get('/studio/edit-link/{id}', [UserController::class, 'showLink'])->name('showLink');
3944
Route::post('/studio/edit-link/{id}', [UserController::class, 'editLink'])->name('editLink');
4045
Route::get('/studio/page', [UserController::class, 'showPage'])->name('showPage');
46+
Route::get('/studio/no_page_name', [UserController::class, 'showPage'])->name('showPage');
4147
Route::post('/studio/page', [UserController::class, 'editPage'])->name('editPage');
4248
Route::get('/studio/profile', [UserController::class, 'showProfile'])->name('showProfile');
4349
Route::post('/studio/profile', [UserController::class, 'editProfile'])->name('editProfile');

0 commit comments

Comments
 (0)