Rulez into ze Database

This commit is contained in:
noxy
2019-11-12 19:41:43 +00:00
parent 35c60a47e9
commit e81dffd187
13 changed files with 358 additions and 3 deletions

View 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 rulezController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('rulez', ['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)
{
//
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 300 KiB

After

Width:  |  Height:  |  Size: 168 KiB

View File

@@ -113,7 +113,8 @@ Route::group(["middleware" => "theme"], function() {
Route::get('webm', function() { return view('webm'); })->middleware('auth');
Route::get('about', function() { return view('about'); })->middleware('auth');
Route::get('irc', function() { return view('irc'); });
Route::get('rules', function() { return view('rules'); })->middleware('auth');
Route::get('rules', 'rulezController@index')->middleware('auth');
#Route::get('rulez', 'rulezController@index')->middleware('auth');
Route::get('todo', function() { return view('todo'); })->middleware('auth');
Route::get('contact', function() { return view('contact'); });
Route::get('terms', function() { return view('tos'); })->middleware('auth');

32
app/Models/Rulez.php Normal file
View 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 Rulez extends Model
{
protected $table = 'rulez';
}

View File

@@ -861,3 +861,9 @@ a.rainbow:hover {
#sidebar {
background: #0c343240 !important;
}
.commbordersoos {
background: none;
border: none;
margin: 0;
}

View File

@@ -3196,7 +3196,7 @@ a.file_size {
#parent {
background: #21292f;
border-radius: 5px;
border: 1px solid #1fb2b0;
/*border: 1px solid #1fb2b0;*/
padding: 5px;
cursor: pointer;
}

View File

@@ -0,0 +1,38 @@
@extends('layout')
@section('content')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection

View File

@@ -157,7 +157,7 @@
<div class="media-left">
<img class="media-object" src="@if(isset($video))/thumbs/beta/{{str_replace(".webm","",$video->file)}}.png"@endif">
</div>
<div class="media-body">
<div class="media-koerper">
<h4 class="media-heading">
@if($video->videotitle){{$video->videotitle}}
@else

View File

@@ -0,0 +1,38 @@
@extends('profilelayout')
@section('novidcontent')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
@extends('profilelayout')
@section('novidcontent')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
@extends('profilelayout')
@section('novidcontent')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
@extends('layout')
@section('content')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection

View File

@@ -0,0 +1,38 @@
@extends('layout')
@section('content')
<div class="page-header">
<h3>Rulez</h3>
</div>
<div class="box">
<h5>General</h5>
<ol>
@foreach($generalrules as $rule)
<li>{{$rule->rule}}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Uploading</h5>
<ol>
@foreach($uploadrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Tagging</h5>
<ol>
@foreach($tagrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
<div class="box">
<h5>Commenting</h5>
<ol>
@foreach($commentrules as $rule)
<li>{!!$rule->rule!!}</li>
@endforeach
</ol>
</div>
@endsection