Skip to content

Commit 7c56f23

Browse files
committed
Ony allow to create pastes if logged in
1 parent b179924 commit 7c56f23

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/Http/Controllers/PasteController.php

+2
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,12 @@
1616
class PasteController extends Controller
1717
{
1818
public function index(){
19+
if (!Auth::check()) return redirect('/login');
1920
return view('paste/index');
2021
}
2122

2223
public function submit(Requests\StorePaste $request){
24+
if (!Auth::check()) return redirect('/login');
2325
$title = (empty(trim(Input::get('pasteTitle')))) ? 'Untitled' : Input::get('pasteTitle');
2426

2527
$expiration = Input::get('expire');

0 commit comments

Comments
 (0)