Giter Club home page Giter Club logo

Comments (3)

alaouy avatar alaouy commented on June 20, 2024

@erxsto Can you provide more details on how to reproduce the error?

from youtube.

erxsto avatar erxsto commented on June 20, 2024

In my project, I installed Alaouy & Dawson, one to upload video and the other to view video details.
At the moment of uploading the video, it does not mark error. Then when I want to see the details, I get the error I mentioned. I add you how is my function:
`<?php
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Dawson\Youtube\Facades\Youtube as YoutubeUpload;
use Alaouy\Youtube\Facades\Youtube;

class VideoController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
/
public function index()
{
$videos = Youtube::getVideoInfo('YbIkHQVpDJ8');
return view('content.videoindex', compact('videos'));
}
/
*
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('content/video');
}

/**
 * Store a newly created resource in storage.
 *
 * @param  \Illuminate\Http\Request  $request
 * @return \Illuminate\Http\Response
 */
public function store(Request $request)
{
    {
        $data = request()->validate([
            'title' => 'required|max:255',
            'description' => 'required',
            'video' => 'mimetypes:video/avi,video/mpeg,video/mp4'
        ]);
        $video = YoutubeUpload::upload($request->file('video')->getPathName(), [
            'title'       => $request->input('title'),
            'description' => $request->input('description')
        ]);
 
        return "Video uploaded successfully. Video ID is ". $video->getVideoId();
    }
}

/**
 * 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($video)
{
    $video = YoutubeUpload::delete($video->getVideoId());
    return redirect('videoindex');
}

}
`

from youtube.

alaouy avatar alaouy commented on June 20, 2024

@erxsto Did you resolve your issue?

from youtube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.