infuse maintained by bpez
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- barryvdh/laravel-debugbar 2.0.5
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- barryvdh/laravel-debugbar 2.0.5
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- illuminate/support 5.*
- bpez/transit 1.6.*
- toddish/verify 5.0.0
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.3.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v3 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- illuminate/support 4.1.*
- mjohnson/transit 1.5.*
- toddish/verify 2.*
- clouddueling/mysqldump-php 1.0.*
- intervention/image 1.5.*
- nesbot/carbon 1.8.*
- barryvdh/laravel-debugbar 1.*
- way/generators 2.*
- paquettg/php-html-parser 1.6.3
- meenie/munee 1.5.20
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.0.5
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- 99designs/phumbor 1.1.0
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- bpez/transit 1.6.*
- toddish/verify dev-laravel5
- nesbot/carbon 1.*
- barryvdh/laravel-debugbar 2.*
- intervention/image 2.1.2
- league/flysystem-aws-s3-v2 ~1.0
- paquettg/php-html-parser 1.6.3
- php >=5.4.0
- illuminate/support 4.2.*
- toddish/verify 2.*
- clouddueling/mysqldump-php 1.0.*
- intervention/image 1.5.*
- nesbot/carbon 1.8.*
- barryvdh/laravel-debugbar 1.*
- way/generators 2.*
- bpez/munee 1.5.*
- paquettg/php-html-parser 1.6.3
- bpez/transit 1.6.*
- php >=5.4.0
- illuminate/support 4.1.*
- mjohnson/transit 1.5.*
- toddish/verify 2.*
- clouddueling/mysqldump-php 1.0.*
- intervention/image 1.5.*
- nesbot/carbon 1.8.*
- barryvdh/laravel-debugbar 1.*
- way/generators 2.*
- bpez/munee 1.5.*
- paquettg/php-html-parser 1.6.3
- php >=5.3.7
- illuminate/support 4.1.*
- mjohnson/transit 1.3.*
- php >=5.3.7
- illuminate/support 4.0.x
- mjohnson/transit 1.3.*
comments powered by Disqus
Step 1: Add laravel5 path repo for toddish/verify package
"repositories": [
{
"type": "vcs",
"url": "https://github.com/industrious-mouse/Verify-L4"
}
],
Step 2: Install via composer
> composer require bpez/infuse:5.*
Step 3: Add the ServiceProvider
// config/app.php
'providers' => [
...
'Bpez\Infuse\InfuseServiceProvider' ,
] ,
Step 4: Add to middleware
// app\http\Kernel.php
protected $middleware = [
...
'Bpez\Infuse\Middleware\InfuseBeforeMiddleware',
'Bpez\Infuse\Middleware\InfuseAfterMiddleware'
];
Step 5: Configure auth file
// config/auth.php
...
'driver' => 'verify',
'model' => 'InfuseUser',
...
'password' => [
'email' => 'infuse::emails.password',
...
],
...
Step 6: Publish Configurations & public assets & run migrations
> php artisan vendor:publish --provider="\Bpez\Infuse\InfuseServiceProvider" --tag=infuse_public --force
> php artisan vendor:publish --provider="\Bpez\Infuse\InfuseServiceProvider" --tag=infuse_config
> php artisan vendor:publish --provider="\Bpez\Infuse\InfuseServiceProvider" --tag=infuse_structure
> php artisan migrate --path="vendor/bpez/infuse/migrations"
Step 7: Add to composer.json
"post-update-cmd": [
...
"php artisan vendor:publish --provider="\Bpez\Infuse\InfuseServiceProvider" --tag=infuse_public --force"
],
Step 8: Add to .htaccess
RewriteEngine On
...
RewriteCond %{HTTP:Cookie} devicePixelRatio [NC]
RewriteRule \.(?:jpe?g|gif|png|bmp)$ bpez/infuse/other/retinaimages.php [NC,L]
Step 9: Run infuse migrations
> php artisan migrate
Step 10: Add support to server retina images
RewriteCond %{HTTP:Cookie} devicePixelRatio [NC]
RewriteRule \.(?:jpe?g|gif|png|bmp)$ /packages/bpez/infuse/retinaimages.php [NC,L]
> https://github.com/websoftwares/Throttle
> http://laravel.com/docs/cache
> https://github.com/frenzyapp/turbolinks
> https://github.com/rails/turbolinks
> https://github.com/kossnocorp/jquery.turbolinks
> sudo curl https://raw.github.com/villimagg/Artisan-on-Steroids/master/artisan -o /usr/local/bin/artisan && sudo chmod +x /usr/local/bin/artisan
imports:
- vendor/bpez/infuse/behat.yml
model(mapConifig -> getbModelInstance(s) -> boot -> apiCalls) -> process(route -> renderView)
Turn database field to a html form select. Take in single instanct or multiple.
addSelect(array(
array(
"column" => $columnName,
"array" => array(),
"insertBlank" => false,
"topSelect" => false,
"nested" => $nested,
"nestedLastArray" => $nestedLastArray )
),
...
);
- column - (Required) [string] Database table field name
- array - (Required) [array] Array of values. Formatted:
array(
array('id' => 1, ", 'name' => 'display name'),
array('id' => 2, ", 'name' => 'display name'),
...
)
- insertBlank - (Optional) [boolean] Inserts a blank option to select field. Default value is false.
- nested - (Optional) [array] Model only needed for first one. Every level after that array format required
$nested = array(
"Floorplan",
array("model" => "ImageAsset", "column" => "title")
);
- nestedLastArray - (Optional) [array] Array of level values
$nestedLastArray = array(
array('id' => 1, ", 'name' => 'display name'),
array('id' => 2, ", 'name' => 'display name'),
...
);
Adds a description to a database field.
describeColumn(array(
array(
"column" => $columnName,
"desc" => "description here",
"popover" => true
)
...
);
- column - (Required) [string] Database table field name
- desc - (Required) [string] Description
- popover (Optional) [boolean] If option present then descript displayed as html pop.
Only allow one database entry to be display and created.
onlyOne();
Add a SQL where clause to configuration.
addPermanentFilters(array(
array(
"column" => $columnName,
"operator" => "=",
"value" => 87
)
...
);
- column - (Required) [string] Database table field name
- operator - (Required) [string] SQL comparison opertator. If 'IN' is used for the operator then it use elequents whereIn($column, $value)
- value - (Required) [string | number] Value to be compared to
Add a default value for when an entry is saved.
defaultColumnValues(array(
"column_name_1" => $value1,
"column_name_2" => $value2,
...
);
- array - (Required) [array] Array of default values where the index is the column name and the value is the value for the index
Transform field to multiple select. Where IDs are kept track separated by a coma.
addMultiSelect(array(
array(
"column" => $columnName,
"array" => array(),
),
...
);
- column - (Required) [string] Database table field name
- array - (Required) [array] Array of values. Formatted
array(
array('id' => 1, ", 'name' => 'display name'),
array('id' => 2, ", 'name' => 'display name'),
...
)
One To Many relationships are defined here. Define children relations like format below.
hasMany(array(
array("SomeModelName", "Display Name", array("column_name_1", "column_name2"...) $optionsArray),
...
);
- (Required) [string] Child model name
- (Required) [string] Display name for entries listed on parent edit page
- (Required) [array] Child columns to display on entries listed on parent edit page
- (Optional) [array] Contains extra functionality for dislaying child entries. Some options are as follows:
Ex. Child Columns array may have an array nested to match an id with a value like below:
$childColumnArray = array(
"column_1",
"column_2",
array("column_3" => array(
array("id" => 1, "name" => "some name"),
array("id" => 2, "name" => "some name 2")
),
"column_4",
...
)
array("category" => $categories)
$optionsArray = array(
"order_column" => "display_order",
"order_direction" => "ASC",
"order_integer" => true
)
Ex. For adding custom export and import functions.
$optionsArray = array(
"import_csv_function" => "importUserModelInstancMethod",
"import_csv_function_url" => "/path/to/example/template.csv",
"import_csv_function_text" => "Import CSV for users. Use template provided.",
"export_csv_function" => "exportUserModelInstanceMethod",
"export_csv_function_text" => "Export CSV template to import.",
)
Ex. Split table to act like 2 child tables separated by where clauses.
$optionsArray = array(
"split" => array(
"Gallery Assets" => "main_gallery = 1",
"Gallery 2 Assets" => "main_gallery = 0"
)
)
Changes column to an column to be used for ordering entries. Integer is used for the type. Makes field not editable by user and value automatically set.
displayOrder(array("display_order_column"));
- Database table field names
Configure columns for file upload functionality.
fileUpload(
array(
array("column" => "column_name"),
)
)
- column - (Required) [string] Database table field name
Turns a text field to a addCkeditor.
addCkeditor(
array("column_name_1", "column_name_2", ...)
)
- Database table field names
Add extra action to entry's actions (show | edit | delete | YourActionHere ). Returning an array("type" => "success", "message" => $message) can tap into notification system. Type can be ("success" || "error" || "info" || "warning"). Or returning false will trigger default error message.
callFunction(array(
array(
"function" => "importSomeThing",
"display_name" => "Import some thing",
"long_process" => "Processing please wait...",
"target" => "_BLANK"
),
...
);
- (Required) [string] function - Name of the function. Its a laravel elequent query scope. So if name is importSomeThing then in the model it's declared scopeImportSomeThing
- (Required) [string] Display name for the function
- (Optional) [string] If its a lengthy process you can set a message that will populate a waiting modal while the process is running.
- (Optional) [string] Provide a target for the html anchor tag.
Ex. importSomeThing implementation. Returns an array to the admin marked with type ("success" || "error") and message along with it.
public function importSomeThings()
{
// ... some work here
$message = "Thanks";
return array("type" => "success", "message" => $message);
}
Add top level action under the "Other Actions" dropdown on the scaffold listing page. Function should be static function from the top level model. User instance is passed into static function. Returning an array("type" => "success", "message" => $message) can tap into notification system. Type can be ("success" || "error" || "info" || "warning"). Or returning false will trigger default error message.
addOtherAction(array(
array(
"function" => "seedUrls",
"display_name" => "Import some thing",
),
...
);
- (Required) [string] function - Name of the function. Its a laravel elequent query scope. So if name is importSomeThing then in the model it's declared scopeImportSomeThing
- (Required) [string] Display name for the function
Ex. seedUrls implementation
public function seedUrls($currentUser)
{
// ... some work here
$message = "Thanks";
return array("type" => "success", "message" => $message);
}
Lets you select the column ordering for the edit/create page. Pass in an array with the column names in the desired order.
editListingOrder(array(
"created_at",
"updated_at",
"destination_site",
"display_state",
"property",
"mobile_video_img",
"sub_title",
"video",
"title",
));
- (Required) [string] table field names
Setup models to work with infuse by extending the InfuseModel and using InfuseModelLibrary trait.
class BlogPost extends InfuseModel {
use InfuseModelLibrary;
}
Fetch the full url path for the file name saved to the specific column. Call the url method and pass in the column name as a parameter.
$post = new BlogPost;
$post->url($columnName); // Will return a url similar to http://somedomain.com/upload/some/path/name.jpg
Building on top of url functionality return an instance of a thumbor client. Only works on columns the have a file saved to them. Thumbor is a smart imaging service. It enables on-demand crop, resizing and flipping of images. Thumbor documentation and thumber client documentation can found here:
- https://github.com/thumbor/thumbor/wiki
- https://github.com/99designs/phumbor/blob/master/lib/Thumbor/Url/CommandSet.php
Services configuration required please see service configuration below for setup.
$post = new BlogPost;
$post->thumbor($columnName)->smartCrop(true)->resize(699, 525); // Will return a url to the cropped or filtered version
- When using with img tags add this data attribute: data-no-retina
<?php $post = new BlogPost; ?>
<img src="{{$post->thumbor($columnName)->smartCrop(true)->resize(699, 525)}}" data-no-retina />
Same functionality as InfuseModel url method. For other image resources.
Util::thumbor($url);
- When using with img tags add this data attribute: data-no-retina
<?php $post = new BlogPost; ?>
<img src="{{Util::thumbor($url)->smartCrop(true)->resize(699, 525)}}" data-no-retina />
For delivering assets originating from same origin through CloudFront CDN. Services configuration required please see service configuration below for setup.
Util::cdn($url);
/config/services.php
'thumbor' => [
// Thumbor security key here
'security-key' => '843208u4325032u502532582358235',
// Use cloudfront in front of thumbor for scalability.
'host' => 'http://d443523423.cloudfront.net',
],
'cloudfront' => [
// Distribution domain for file uploaded through infuse.
's3-uploads' => 'http://d4253425.cloudfront.net',
// Distribution domain for assets originating from same origin.
'self-hosted' => 'http://d54343425.cloudfront.net',
],
Include the Util::infuse() on your page (put it at the bottom of your template, before your closing