This file contains 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', |
This file contains 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 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 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
<script> | |
export default { | |
props : [ | |
'messages_url', | |
'store_message_url' | |
], | |
data(){ | |
return { |
This file contains 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; | |
use Illuminate\Database\Eloquent\Model; | |
use Illuminate\Database\Eloquent\Relations\BelongsToMany; | |
class Employee extends Model | |
{ | |
/** |
This file contains 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\Traits; | |
trait Auditable | |
{ | |
/** | |
* The fillable properties for this trait which will be applied to the model. | |
* | |
* @var array |
This file contains 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
curl -X POST -u "{username}":"{password}" --header "Content-Type: audio/wav;codec=pcm;bit=16;rate=16000" --header "Accept: application/json" --header "Transfer-Encoding: chunked" --data-binary @file.wav "https://stream.watsonplatform.net/speech-to-text/api/v1/recognize?model=en-US_NarrowbandModel&speaker_labels=true" |
This file contains 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\Providers; | |
use Illuminate\Support\ServiceProvider; | |
use Validator; | |
class AppServiceProvider extends ServiceProvider | |
{ | |
/** |
This file contains 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\Requests; | |
use App\Http\Requests\Request; | |
class StoreUserFormRequest extends Request | |
{ | |
/** | |
* The key to be used for the view error bag. |
This file contains 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\Requests; | |
use Auth; | |
use Illuminate\Foundation\Http\FormRequest; | |
class UpdateUserRequest extends FormRequest { | |
/** | |
* Get the validation rules that apply to the request. | |
* |
NewerOlder