Reading file size
This commit is contained in:
@@ -13,7 +13,6 @@ class Index extends Controller
|
||||
{
|
||||
$courses = Course::with('chapters')->withCount('chapters')->get();
|
||||
|
||||
// dd($courses->toArray());
|
||||
return view('index', compact(['courses']));
|
||||
}
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ class SymfonyCastDlService
|
||||
]);
|
||||
}
|
||||
|
||||
public function getInfo()
|
||||
public function getInfo(): void
|
||||
{
|
||||
$coursePage = $this->client->get('courses/filtering');
|
||||
|
||||
@@ -64,8 +64,11 @@ class SymfonyCastDlService
|
||||
|
||||
public function downloadFile(Chapter $chapter): void
|
||||
{
|
||||
if (!is_dir(public_path($chapter->directory_path))) {
|
||||
mkdir(public_path($chapter->directory_path));
|
||||
if (is_null($chapter->video_link)) {
|
||||
return;
|
||||
}
|
||||
if (!is_dir($chapter->directory_path)) {
|
||||
mkdir($chapter->directory_path);
|
||||
}
|
||||
if (!$chapter->is_video_file) {
|
||||
$this->client->request(
|
||||
|
||||
Reference in New Issue
Block a user