samedi 30 janvier 2016

Laravel 5.1 - Method 'disk' not found in class \Illuminate\Support\Facade\Storage

I need to store images uploaded from a form to a project directory. But i'm having trouble using this method in my controller

Storage::disk('local')->put('image.jpg', 'Contents');

This is my controller

<?php

namespace App\Http\Controllers;

use App\Event;
use Illuminate\Http\Request;

use App\Http\Requests;
use App\Http\Controllers\Controller;
use Illuminate\Support\Facades\Validator;
use Illuminate\Support\Facades\Storage;

Even though i used 'Storage' class, phpstorm states that method 'disk'(or 'put' or 'delete') is not in that class. I'm using phpstorm 10

If I use like this,

use Storage;

phpstorm says undefined class 'Storage'



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire