PHP code example of bkwld / upchuck

1. Go to this page and download the library: Download bkwld/upchuck library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

bkwld / upchuck example snippets


class Person extends Eloquent {

	// Use the trait
	use Bkwld\Upchuck\SupportsUploads;

	// Define the uploadable attributes
	protected $upload_attributes = [ 'image', 'pdf', ];

	// Since the upload handling happens via model events, it acts like a mass
	// assignment.  As such, Upchuck sets attributes via `fill()` so you can
	// control the setting.
	protected $fillable = ['image', 'pdf'];
}

$model = new Model;
$model->fill(Input::all())
$model->save();