Download the PHP package hitesh399/laravel-media without Composer

On this page you can find all versions of the php package hitesh399/laravel-media. 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 laravel-media

How to install and configure the package into your project

composer require hitesh399/laravel-media

Add the provider into the config/app.php file

Add the alias in the config/app.php file

To publish the vendor and update the database schema you can execute the below-mentioned commands:(You also need to install the node and npm)

To compile the media files, add the below line into the webpack.mix.js file

To generate the script/css execute the below mentioned command

Put the filesystem driver in .env file

Configure the config/filesystems.php as shown below

To create the storage link execute the below-mentioned command

Define the global variable by adding below-mentioned script in between the head tag

To use the media popup, include the jquery and bootstrap framework css/js files and also add the below-mentioned script file.

Create the Controller

Add the below-listed line in route file to define the media routes

To get started, add the below-listed line in html file

How to use the media pop and also override the features

Use the function Form::laravelMedia($name, $label, $data, $listmaker, $htmlrender, $options)


$name [string] -> pass name of element
$label [string] -> pass the lebel of element
$listmaker[string] -> javascript function, to modify the slected file html, the callback function should be define in javascript with four arguments Like: 
function listmaker(hiddenFields, file, index, elementName) => HTML
    hiddenFields [html] -> contains the html of file hidden fields,
    file [Object] -> Object of selected file
    index [integer] -> index of selected file
    elemengtName [string] -> media field name
Note: in this function you have to renturn the HTMl
$htmlrender [string] -> javascript function, To render the prepare the html by listmaker function, function have the 3 arguments Like:
function htmlrender (html, inputName, element )
    html [HTML] -> prepare html by listmaker function
    inputName [String] -> media field name
    element [Object] instance of the media button which use to open the media popup.
$options [Array] => [
    tag [string] -> should be html tag like: button, a, span, and more
    tag_class [String] -> define the class name of media button
    thumb [Array] => [
        [
            h [String] -> define the height of thumbnail
            w [String] -> define the width of thumbnail
            title [String] ->define the title of thumbnail
        ]
    ]
    title [String] -> Title to diplay on the media popup
    selected_btn_text [String]  -> Selected button text 
    close_btn_text [String] -> Close button text
    maxFiles [integer] -> Max number of file.
    maxFilesize [integer] -> Max size of file in bytes 
    acceptedFiles [String] -> Accepted file type like: image/*,/png, application/*, .gif

]

All versions of laravel-media with dependencies

PHP Build Version
Package Version
Requires laravel/framework Version 5.*
laravelcollective/html Version 5.*
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 hitesh399/laravel-media contains the following files

Loading the files please wait ....