src/Image/Manager.php
public function makeSizes()
    {
        $name = basename($this->dbPath);
        $path = str_replace('/' . $name, '', $this->dbPath);
        $sizes = config('avored-framework.image.sizes');

        foreach ($sizes as $sizeName => $widthHeight) {
            list($width, $height) = $widthHeight;
            $imagePath = storage_path('app/public/' . $path) . DIRECTORY_SEPARATOR . $sizeName . '-' . $name;

            $this->driver
                ->path($this->dbPath)
                ->make()
                ->resize($width, $height)
                ->saveImage($imagePath, 100);
        }

        return $this;
    }
public function makeSizes()
    {
        $name = basename($this->dbPath);
        $path = str_replace('/' . $name, '', $this->dbPath);
        $sizes = config('avored-framework.image.sizes');

        foreach ($sizes as $sizeName => $widthHeight) {
            list($width, $height) = $widthHeight;
            $imagePath = storage_path('app/public/' . $path) . DIRECTORY_SEPARATOR . $sizeName . '-' . $name;

            $this->driver
                ->path($this->dbPath)
                ->make()
                ->resize($width, $height)
                ->saveImage($imagePath, 100);
        }

        return $this;
    }
public function makeSizes ( ) { $ name = basename ( $ this -> dbPath ) ; $ path = str_replace ( '/' . $ name , '' , $ this -> dbPath ) ; $ sizes = config ( 'avored-framework.image.sizes' ) ; foreach ( $ sizes as $ sizeName => $ widthHeight ) { list ( $ width , $ height ) = $ widthHeight ; $ imagePath = storage_path ( 'app/public/' . $ path ) . DIRECTORY_SEPARATOR . $ sizeName . '-' . $ name ; $ this -> driver -> path ( $ this -> dbPath ) -> make ( ) -> resize ( $ width , $ height ) -> saveImage ( $ imagePath , 100 ) ; } return $ this ; }
Make Different Sizes of the image based on config
@return self $this
Make Different Sizes of the image based on config