- Thread starter
- #1
Hello guys,
today I would like to share my auto image description generator with you.
Installation
Go to app/Http/Controllers/ImagesController.php and search for
replace with
Best regards,
PureGod.
today I would like to share my auto image description generator with you.
Installation
Go to app/Http/Controllers/ImagesController.php and search for
PHP:
if( !empty( $request->description ) ) {
$description = Helper::checkTextDb($request->description);
} else {
$description = '';
}
PHP:
if( !empty( $request->description ) )
{
$description = Helper::checkTextDb($request->description);
}
else
{
$a_key = explode(",", strtolower($request->tags));
if(count($a_key) == 0)
$description = 'This is a great high quality free image';
else
{
$description_get_keys = '';
foreach ($a_key as &$value)
{
if($value == end($a_key) && count($a_key) != 1)
$description_get_keys = $description_get_keys.' and '.$value.'.';
else if(count($a_key) == 1)
$description_get_keys = $value.'.';
else if (count($a_key) > 1 && $a_key[0] == $value)
$description_get_keys = $value;
else
$description_get_keys = $description_get_keys.', '.$value;
}
$description = 'This high quality free image is about '.$description_get_keys;
}
}
Credits
HowToMedia - PureGod
If you require any help, let me know!
HowToMedia - PureGod
If you require any help, let me know!
Best regards,
PureGod.