Giter Club home page Giter Club logo

laravel-bitrix24's Introduction

Bitrix24 PHP SDK (https://github.com/mesilov/bitrix24-php-sdk) for Laravel through Dependency Injection (Service Provider, Singleton).

1. Installation

composer require vipblogger/laravel-bitrix24

2. Setup

Publishing the config file and migrate

php artisan vendor:publish --provider="Vipblogger\LaravelBitrix24\LaravelBitrix24ServiceProvider"

php artisan migrate

3. In Bitrix24

Register local application with redirect URI /bitrix-redirect-uri. Redirect URI is optional.

4. Edit .env

.env example

B24_APPLICATION_ID=local.6007b39598c****.120****
B24_APPLICATION_SECRET=oq33VjMcuperGAnB...
B24_DOMAIN=example.bitrix24.ru
B24_APPLICATION_SCOPE=task,user
B24_REDIRECT_URI=/bitrix-redirect-uri

5. Bitrix24 settings

Go to route your_project.com/laravel-bitrix24

6. Usage

use Vipblogger\LaravelBitrix24\Bitrix;

Route::get('/test1', function (Bitrix $bitrix) {
    $result = $bitrix->call('lists.get', [
        'IBLOCK_TYPE_ID' => 'lists_socnet',
        'SOCNET_GROUP_ID' => 15
        ]);

    var_dump($result);
});

Route::get('/test2', function (Bitrix $bitrix) {
    $obB24User = new \Bitrix24\User\User($bitrix);
    $arCurrentB24User = $obB24User->current();
    var_dump($arCurrentB24User);
});

More documentation: https://github.com/mesilov/bitrix24-php-sdk

laravel-bitrix24's People

Contributors

vipblogger avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

laravel-bitrix24's Issues

old version mesilov/bitrix24-php-sdk 0.7.0 and problems with install on laravel 9.34

i try to install this package to my laravel 9.34 project, and i got error:

_Your requirements could not be resolved to an installable set of packages.

Problem 1
- mesilov/bitrix24-php-sdk 0.7.0 requires psr/log ^1.0 -> found psr/log[1.0.0, ..., 1.1.4] but the package is fixed to 3.0.0 (lock file version) by a partial update and that version does not match. Make sure you list it as an ar
gument for the update command.
- vipblogger/laravel-bitrix24 1.0.2 requires mesilov/bitrix24-php-sdk ^0.7.0 -> satisfiable by mesilov/bitrix24-php-sdk[0.7.0].
- Root composer.json requires vipblogger/laravel-bitrix24 ^1.0 -> satisfiable by vipblogger/laravel-bitrix24[1.0.2].

Use the option --with-all-dependencies (-W) to allow upgrades, downgrades and removals for packages currently locked to specific versions.
You can also try re-running composer require with an explicit version constraint, e.g. "composer require vipblogger/laravel-bitrix24:*" to figure out if any version is installable, or "composer require vipblogger/laravel-bitrix24:^2
.1" if you know which you need._

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.