Download the PHP package sawastacks/kropify-laravel without Composer

On this page you can find all versions of the php package sawastacks/kropify-laravel. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package kropify-laravel

!['Kropify'](img/kropify.png)

![GitHub release](https://img.shields.io/github/v/release/sawastacks/kropify-laravel) GitHub code size in bytes [![Total Downloads](https://poser.pugx.org/sawastacks/kropify-laravel/downloads)](https://packagist.org/packages/sawastacks/kropify-laravel) [![Package License](https://img.shields.io/badge/License-MIT-brightgreen.svg)](LICENSE) GitHub Org's stars

Kropify - Image Cropping Package

This package (Kropify class) handles the server-side file upload and saving. The Kropify.js script integrates with the frontend to provide cropping, previewing, and uploading of images with your Laravel backend.
This package is built using vanilla JavaScript, so it doesn't require jQuery as a dependency. It's lightweight, easy to integrate into your project without adding any extra library overhead, and supports multiple instances on a single page.

Requirements

Installation

This package can be installed through composer require command. Before install this, make sure that your are working with PHP >= 7.2 in your system. Just run the following command in your cmd or terminal:

  1. Install the package via Composer:

    The package will automatically register its service provider if your Laravel framework is 8.x or above.

  2. Optionally, After you have installed Kropify, open your Laravel config file config/app.php and add the following lines.

    In the $providers array, add the service providers for this package.

  3. After Kropify package installed, you need to publish its css and js minified files in Laravel public folder by running the following command in terminal:

    html

    html

    bash composer update sawastacks/kropify-laravel bash composer remove sawastacks/kropify-laravel && composer require sawastacks/kropify-laravel bash php artisan vendor:publish --tag=kropify-assets --force bash php artisan view:clear bash composer dump-autoload html

    Page title @kropifyStyles ...... ... html Page title ...... ... html .......... ..... @kropifyScripts html .......... .....

    html <!DOCTYPE html>

    Document @kropifyStyles
    ........ .......... ........... @kropifyScripts

    javascript

    javascript onError: function (msg) { alert(msg); // toastr.error(msg); }, onDone: function(response){ alert(response.message); console.log(response.data); // toastr.success(response.message); }

In controller

To include Kropify class in controller is very simple. Just import the following lines on your controller.

To upload the cropped image you will use the following lines inside method:

🚀 Kropify Class - Methods Overview

Method Description Usage/Notes
getFile($file, $filename = null) Initializes the file upload. Must be called first. $file: instance of uploaded file, $filename: optional custom filename.
setDisk(string $disk) Set the storage disk to use (public, local, etc.). Throws error if useMove() already used or if not preceded by getFile().
useMove() Use PHP’s move() instead of Laravel’s Storage. Can’t be used with setDisk().
setPath(string $path) Set the relative path (within storage/public) for the file. Example: uploads/avatars.
save() Saves the uploaded file. Must be called after setting up the upload. Can only be called once per instance.
getUploadedInfo() Retrieve details of the saved file: filename, size, extension, dimensions, mime, path, URL. Can only be called after save().

📄 License

This package is open-sourced software licensed under the MIT license.

🙌 Credits

Author: Sawa Stacks
📧 Email: [email protected]
🌐 GitHub: github.com/sawastacks


All versions of kropify-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^7.2|^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package sawastacks/kropify-laravel contains the following files

Loading the files please wait ....