Skip to content

4.0.1

Choose a tag to compare

@olivervogel olivervogel released this 20 Jun 06:48
· 7 commits to develop since this release
84a730b

What's Changed

  • Bind Intervention\Image\ImageManager::class and Intervention\Image\Interfaces\ImageManagerInterface as configured singletons.

Code Example:

use Intervention\Image\Interfaces\ImageManagerInterface;

class ImageController extends Controller
{
    /**
     * Create a new controller instance.
     */
    public function __construct(
        protected ImageManagerInterface $imageManager,
    ) {}

    /**
     * Store a new Image.
     */
    public function store(Request $request): RedirectResponse
    {
        $image = $this->imageManager->decode($request->image);
 
        // image manipulation ...
 
        return redirect('/images');
    }
}