server ver
This commit is contained in:
88
app/Http/Controllers/aboutController.php
Normal file
88
app/Http/Controllers/aboutController.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\About;
|
||||
use App\Http\Requests;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class aboutController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
$inhalt = About::all();
|
||||
return view('about', ['blah' => $inhalt[0]->content]);
|
||||
}
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Binary file not shown.
Before Width: | Height: | Size: 866 KiB After Width: | Height: | Size: 1.9 KiB |
@@ -86,6 +86,24 @@ Route::group(['prefix' => 'api'], function() {
|
||||
|
||||
});
|
||||
|
||||
Route::get('togglebackground', function() {
|
||||
$request = request();
|
||||
$user = auth()->check() ? auth()->user() : null;
|
||||
|
||||
if(is_null($user)) {
|
||||
Session::put('background', !Session::get('background', true));
|
||||
} else {
|
||||
$user->background = !$user->background;
|
||||
Session::put('background', $user->background);
|
||||
$user->save();
|
||||
}
|
||||
|
||||
if($request->ajax())
|
||||
return json_encode(true);
|
||||
|
||||
return redirect()->back()->with('success, Background toggled');
|
||||
});
|
||||
|
||||
|
||||
|
||||
Route::group(["middleware" => "theme"], function() {
|
||||
@@ -112,7 +130,10 @@ Route::group(["middleware" => "theme"], function() {
|
||||
Route::get('upload', 'VideoController@create')->middleware('auth');
|
||||
Route::get('categories', 'CategoryController@index')->middleware('auth');
|
||||
Route::get('webm', function() { return view('webm'); })->middleware('auth');
|
||||
Route::get('about', function() { return view('about'); })->middleware('auth');
|
||||
Route::get('settings', function() { return view('settings'); })->middleware('auth');
|
||||
Route::get('matrix', function() { return view('matrix'); })->middleware('auth');
|
||||
#Route::get('about', function() { return view('about'); })->middleware('auth');
|
||||
Route::get('about', 'aboutController@index')->middleware('auth');
|
||||
Route::get('irc', function() { return view('irc'); });
|
||||
Route::get('rules', 'rulezController@index');
|
||||
#Route::get('tos', function() { return view('tos'); });
|
||||
@@ -121,7 +142,7 @@ Route::group(["middleware" => "theme"], function() {
|
||||
Route::get('contact', function() { return view('contact'); });
|
||||
#Route::get('terms', function() { return view('tos'); })->middleware('auth');
|
||||
Route::get('privacy', function() { return view('privacy'); });
|
||||
Route::get('stats', function() {
|
||||
Route::get('stats', function() {
|
||||
return view('stats', [
|
||||
'user_count' => \App\Models\User::count(),
|
||||
'upload_count' => \App\Models\Video::count(),
|
||||
@@ -172,7 +193,7 @@ Route::group(["middleware" => "theme"], function() {
|
||||
echo '<p style="color: #00ff30;">Matched :)</p>';
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$form = '<form method="post" action="captcha-test">';
|
||||
$form .= '<input type="hidden" name="_token" value="' . csrf_token() . '">';
|
||||
$form .= '<p>' . captcha_img() . '</p>';
|
||||
|
32
app/Models/About.php
Normal file
32
app/Models/About.php
Normal file
@@ -0,0 +1,32 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
/**
|
||||
* App\Models\Category
|
||||
*
|
||||
* @property integer $id
|
||||
* @property string $name
|
||||
* @property string $shortname
|
||||
* @property string $description
|
||||
* @property \Carbon\Carbon $created_at
|
||||
* @property \Carbon\Carbon $updated_at
|
||||
* @property string $deleted_at
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|Video[] $videos
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereId($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereName($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereShortname($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereDescription($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereCreatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereUpdatedAt($value)
|
||||
* @method static \Illuminate\Database\Query\Builder|\App\Models\Category whereDeletedAt($value)
|
||||
* @property-read \Illuminate\Database\Eloquent\Collection|User[] $users
|
||||
*/
|
||||
class About extends Model
|
||||
{
|
||||
|
||||
protected $table = 'about';
|
||||
|
||||
}
|
88
app/Models/aboutController.php
Normal file
88
app/Models/aboutController.php
Normal file
@@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\Request;
|
||||
use App\Models\Rulez;
|
||||
use App\Http\Requests;
|
||||
use Illuminate\Database\Eloquent\Relations\HasMany;
|
||||
use App\Http\Controllers\Controller;
|
||||
|
||||
class aboutController extends Controller
|
||||
{
|
||||
/**
|
||||
* Display a listing of the resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function index()
|
||||
{
|
||||
return view('about', ['rules' => Rulez::all(), 'uploadrules' => Rulez::where('zuordnung', '=', 'Upload')->get(), 'tagrules' => Rulez::where('zuordnung', '=', 'Tagging')->get(), 'generalrules' => Rulez::where('zuordnung', '=', 'General')->get(), 'commentrules' => Rulez::where('zuordnung', '=', 'Commenting')->get()]);
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for creating a new resource.
|
||||
*
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function create()
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Store a newly created resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function store(Request $request)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Display the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function show($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Show the form for editing the specified resource.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function edit($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Update the specified resource in storage.
|
||||
*
|
||||
* @param \Illuminate\Http\Request $request
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function update(Request $request, $id)
|
||||
{
|
||||
//
|
||||
}
|
||||
|
||||
/**
|
||||
* Remove the specified resource from storage.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Illuminate\Http\Response
|
||||
*/
|
||||
public function destroy($id)
|
||||
{
|
||||
//
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user