Skip to content
Laravel OpenAI examples

Laravel OpenAI examples

Created:

Updated:

Categories: Projects

Author: Tobias Schottstädt

Laravel OpenAI examples

This repository shows how to use OpenAI features with Laravel 10, Tailwind, OpenAI-PHP and Laravel Prompts. It provides examples of text generation, audio generation, image generation and enhancement, and chatbot interactions.


Programming languages 

  • PHP: A server-side scripting language that is mainly used for web development. Here it is used to implement the logic and functionality of the Laravel application.

Blade (Laravel): Laravel's templating engine, which makes it possible to embed PHP code in HTML templates. It is used for the presentation of the user interface. 

  • JavaScript: A programming language that is mainly used to create interactive web content. Here it is used in combination with Tailwind CSS for dynamic and responsive front-end functions.

Tailwind CSS: A utility-first CSS framework that allows you to quickly create custom designs without having to write a lot of CSS yourself. 


README content

The repository offers various examples of what you can do with OpenAI and Laravel, including:

  • Generating poems
  • Audio generation (pranks)
  • Image generation and enhancement
  • Chatbot interactions


Use of the repository

  1. Clone repository: git clone https://github.com/xchimx/Laravel-OpenAI-Examples.git
  2. Install dependencies: composer install
  3. Set environment variables: cp .env.example .env and php artisan key:generate
  4. Configure the API key: Add OpenAI API key to .env file.
  5. Install and compile assets: npm install and npm run build
  6. Create storage link: php artisan storage:link


More information

For more detailed information and the complete source code visit the repository.

Tobias Schottstädt

Author

Hey 👋 my name is Tobias Schottstädt and I am a full-stack developer. As a ki specialist from Kassel I may be able to support you in your project. I look forward to hearing from you! Whether you have questions, suggestions or feedback. |

My main focus is on application development, which I realize mainly with the programming languages PHP and JavaScript, using the frameworks Laravel and Vue.js or Livewire.