add api display content
This commit is contained in:
@@ -0,0 +1,43 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Controllers\Api\V1;
|
||||
|
||||
use App\Http\Controllers\Controller;
|
||||
use Illuminate\Http\Request;
|
||||
|
||||
class DisplayContentController extends Controller
|
||||
{
|
||||
public function index() {
|
||||
// $path = 'assets/content/display_content/image/';
|
||||
|
||||
// return response()->json([
|
||||
// "id" => 1,
|
||||
// "type" => 'image',
|
||||
// 'content' => [
|
||||
// url($path . '1.jpg'),
|
||||
// url($path . '2.jpg'),
|
||||
// url($path . '3.jpg'),
|
||||
// url($path . '4.jpg'),
|
||||
// url($path . '5.jpg'),
|
||||
// ]
|
||||
// ]);
|
||||
|
||||
$path = 'assets/content/display_content/video/';
|
||||
|
||||
return response()->json([
|
||||
"id" => 1,
|
||||
"type" => 'video',
|
||||
'content' => [
|
||||
// "display_1" => url($path . '1.mp4'),
|
||||
// "display_2" => url($path . '2.mp4'),
|
||||
// "display_3" => url($path . '3.mp4'),
|
||||
// url($path . '1.mp4'),
|
||||
url($path . 'video_2bak.mp4'),
|
||||
url($path . 'video_3bak.mp4'),
|
||||
// url($path . 'new_3.mp4'),
|
||||
// url($path . 'new_4.mp4'),
|
||||
// url($path . 'new_5.mp4'),
|
||||
]
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user