Skip to content

Instantly share code, notes, and snippets.

View goran-popovic's full-sized avatar

Goran Popović goran-popovic

View GitHub Profile
@goran-popovic
goran-popovic / MonitorOrders.php
Last active February 25, 2024 09:41
Running custom Artisan commands with Supervisor - Basic Example (https://geoligard.com/running-custom-artisan-commands-with-supervisor)
<?php
namespace App\Console\Commands;
use Illuminate\Console\Command;
use Illuminate\Support\Facades\Cache;
class MonitorOrders extends Command
{
/**
@goran-popovic
goran-popovic / Base64Controller.php
Last active February 25, 2024 09:34
Send, validate, and store Base64 files with Laravel - Basic Example (https://geoligard.com/send-validate-and-store-base64-files-with-laravel)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\File;
use Illuminate\Http\UploadedFile;
use Illuminate\Support\Arr;
use Illuminate\Support\Facades\Storage;
use Illuminate\Support\Facades\Validator;
@goran-popovic
goran-popovic / AssistantController.php
Last active December 10, 2024 03:04
Using Laravel to interact with OpenAI's Assistant API (with Vision) - Basic Example (https://geoligard.com/using-laravel-to-interact-with-openai-s-assistants-api-with-vision)
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use OpenAI\Laravel\Facades\OpenAI;
class AssistantController extends Controller
{
public function generateAssistantsResponse(Request $request)