This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
namespace App\Http\Resources; | |
use Illuminate\Http\Resources\Json\JsonResource; | |
class Something extends JsonResource | |
{ | |
/** | |
* Transform the resource into an array. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if( ! function_exists('pipe')) { | |
function pipe($payload, $steps = []) | |
{ | |
return app(\Illuminate\Pipeline\Pipeline::class) | |
->send($payload) | |
->through($steps) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$city_fact_result = OpenAI::chat()->create([ | |
'model' => 'gpt-3.5-turbo', | |
'messages' => [ | |
[ | |
'role' => 'user', | |
'content' => "I'm in {$location}?", | |
],[ | |
'role' => 'assistant', |
OlderNewer