sadok
1282
25
Laravel

Class 'App\Http\Controllers\Storage' not found

Posted 6 months ago by sadok
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\Http\UploadedFile;
use App\User;
use App\Team;
use App\Club;

class TeamController extends Controller
{

public function destroy($id)
  {
    $team=Team::findOrFail($id);
    $team->delete();
    Storage::delete($team->logo);
    return response()->json(['data' => $team],200);
  }
}

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up

Channels

Reply to

Use Markdown with GitHub-flavored code blocks.