To fix this error, insert "use Illuminate\Support\Facades\Storage;" at the top of your controller.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use Illuminate\View\View;
use App\Models\Country;
use App\Models\Tags;
use App\Models\Event;
use App\Http\Requests\CreateEventRequest;
use Illuminate\Support\Facades\Storage; //here it is
use Illuminate\Support\Str;
class EventController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index(): View
{
$events = Event::with('country')->get();
return view('events.index', compact('events'));
}
}
Top comments (0)