Media show stylesheet...

This commit is contained in:
cuneytsenturk
2019-02-02 11:15:24 +03:00
parent 2e6c42f7ba
commit 373c2f89e5
7 changed files with 143 additions and 32 deletions

View File

@ -28,6 +28,42 @@ class Uploads extends Controller
return response()->file($path);
}
/**
* Get the specified resource.
*
* @param $id
* @return mixed
*/
public function show($id)
{
$file = false;
$media = Media::find($id);
// Get file path
if (!$path = $this->getPath($media)) {
return response()->json([
'success' => false,
'error' => true,
'data' => [],
'message' => 'null',
'html' => '',
]);
}
$file = $media;
$html = view('partials.media.file', compact('file'))->render();
return response()->json([
'success' => true,
'error' => false,
'data' => [],
'message' => 'null',
'html' => $html,
]);
}
/**
* Download the specified resource.
*