> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crunchz.app/llms.txt
> Use this file to discover all available pages before exploring further.

# Installation

> Step-by-step guide for installing and configuring the CrunchzApp PHP SDK in your Laravel application.

# Getting Started with CrunchzApp SDK

This guide will walk you through the process of installing and configuring the CrunchzApp PHP SDK for your Laravel application.

## Requirements

Before you begin, ensure your environment meets the following requirements:

<Note>
  These requirements are essential for the proper functioning of the CrunchzApp SDK.
</Note>

* **PHP 7.3 or higher** - The SDK requires PHP 7.3+ for optimal performance and security
* **Composer** - For package management and dependency resolution
* **CrunchzApp account** - You'll need either a Channel Token or Global Token (available in your account)

<Tip>
  Not sure which token to use? Global tokens provide access to all channels, while Channel tokens are specific to individual channels. Choose based on your application's needs.
</Tip>

## Installation

Follow these steps to install the SDK in your Laravel project:

### Step 1: Install via Composer

Run the following command in your project directory:

```bash theme={null}
composer require crunchzapp/crunchzapp-php-sdk
```

<Check>
  After installation, you should see the package listed in your `composer.json` file.
</Check>

## Configuration

Setting up the SDK requires two main steps:

### Step 1: Publish Configuration Files

Before initializing the package, publish the configuration file by running:

```bash theme={null}
php artisan vendor:publish --tag=crunchzapp-config
```

<Warning>
  This step is required to make the SDK work properly with your Laravel application.
</Warning>

### Step 2: Configure Environment Variables

Add your CrunchzApp token to your `.env` file:

```bash theme={null}
CRUNCHZAPP_TOKEN=your_token_here
```

<Accordion title="Where to find your token">
  1. Log in to your CrunchzApp dashboard
  2. Navigate to User Settings
  3. Find either your Channel token or Global token
  4. Copy and paste it into your `.env` file
</Accordion>

<Tip>
  For security reasons, never commit your token to version control. Always use environment variables.
</Tip>

## Next Steps

After completing the installation and configuration, you're ready to start using the CrunchzApp SDK in your Laravel application. Check out our API documentation for available methods and features.
