PHP code example of quickcamx / devices

1. Go to this page and download the library: Download quickcamx/devices library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

quickcamx / devices example snippets


return [
     'allow_device_reassign' => false,
];

use Sfolador\Devices\Models\Concerns\HasDevices;

class User extends Authenticatable
{
    use HasDevices;
}

$user = User::find(1);
$user->devices;

Route::post('/devices/attach', [DeviceController::class, 'attach']);


$rules = [
    'platform' => ['Enum(DeviceType::class)],
    'token' => '

return [

    'authentication_key' => null

];


class User extends Model
{
    use HasDevices;
    use RoutesNotifications;

...


$user = User::find(1);
$user->notify(new \Sfolador\Devices\Notifications\FirebasePushNotification('title','message'));

bash
php artisan vendor:publish --tag="devices-config"
bash
php artisan vendor:publish --tag="devices-migrations"
php artisan migrate
bash
php artisan vendor:publish --provider="Kutia\Larafirebase\Providers\LarafirebaseServiceProvider"