Skip to content

Commit

Permalink
Update CRUDBooster.php
Browse files Browse the repository at this point in the history
Add helper function: Comma-delimited data output from the child table.
  • Loading branch information
xSoulRootx authored Jan 7, 2019
1 parent 75e21be commit ed7f26c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/helpers/CRUDBooster.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,16 @@

class CRUDBooster
{
/**
Comma-delimited data output from the child table
*/
public static function echoSelect2Mult($values, $table, $id, $name) {
$values = explode(",", $values);
return implode(", ", DB::table($table)->whereIn($id, $values)->pluck($name)->toArray());
//implode(", ", DB::table("syudo_list_pokemons_types")->whereIn("id", explode(",", $row->type))->pluck("name")->toArray())

}

public static function uploadBase64($value, $id = null)
{
if (! self::myId()) {
Expand Down

0 comments on commit ed7f26c

Please sign in to comment.