This commit is contained in:
2024-03-17 16:30:27 +01:00
parent 93b7402a16
commit c5a1a42923
15 changed files with 435 additions and 35 deletions

View File

@@ -0,0 +1,118 @@
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Http\Requests;
use App\Http\Controllers\Controller;
use App\Models\Category;
use App\Models\Tag;
class DebugController extends Controller
{
public function getRandomVideoForCategory(Category $category)
{
$randomVideo = \App\Models\Video::getRandom($category);
// Now you can return or use $randomVideo as needed
}
public function getRandomVideoForTag(Tag $tag)
{
$randomVideo = \App\Models\Video::getRandom($tag);
// Now you can return or use $randomVideo as needed
}
public function getSingleRandomVideoForCategory(Category $category)
{
$singleRandomVideo = \App\Models\Video::getSingleRandom($category);
// Now you can return or use $singleRandomVideo as needed
}
public function getSingleRandomVideoForTag(Tag $tag)
{
$singleRandomVideo = \App\Models\Video::getSingleRandom($tag);
// Now you can return or use $singleRandomVideo as needed
}
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
//
}
/**
* 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)
{
//
}
}