/** * Get all of the available token abilities. * * @return Response */ public function all() { return response()->json(collect(Spark::tokensCan())->map(function ($value, $key) { return ['name' => $value, 'value' => $key, 'default' => in_array($key, Spark::tokenDefaults())]; })->values()); }