Installation SMSRocket
You can install the SMSRocket package in your CodeIgniter 4 project using either Composer or manual installation. Using Composer is the recommended way to install SMSRocket as it simplifies dependency management and package updates. However, if you have any issues with Composer, the manual installation method allows you to use the package as well.
Using Composer is the easiest and fastest way to install the package. Follow these steps:
-
Open Terminal or Command Prompt: Open your terminal or Command Prompt and navigate to your CodeIgniter 4 project directory.
-
Run the Installation Command: Execute the following command to install the SMSRocket package:
composer require datamweb/sms-rocket
Composer will download the package and add it to your project.
-
Update Configuration (Optional): After installation, the package files will be placed in the
vendor/
directory and will be automatically loaded by Composer. You may need to update your project configuration files as necessary.
If you cannot use Composer or prefer to install the package manually, follow these steps:
-
Download the Package First, download the SMSRocket package manually.
- Visit the package’s GitHub repository and download the latest version.
- Alternatively, if you have the ZIP file of the package, copy it to your project directory.
-
Extract Files Extract the ZIP file and place the contents in an appropriate directory. For example, you can copy it to
APPPATH . 'ThirdParty\sms-rocket\src'
. -
Update Autoloader To ensure the package is automatically loaded in your project, update the Autoloader configuration. Go to
app/Config/Autoload.php
and add the package namespace and path:$psr4 = [ 'App' => APPPATH, 'Datamweb\\SMSRocket' => APPPATH . 'ThirdParty\sms-rocket\src' ];
-
Configure the Package After adding the package, make sure to configure the necessary settings for SMSRocket (like setting up API Key and ...).