stickleapp/core
Composer 安装命令:
composer require stickleapp/core
包简介
This is my package stickle core
README 文档
README
This software is not ready to be used. Contact me dclaysmith@gmail.com.
Stickle is a package for Laravel that helps you analyze--and interact with--your customer base.
Use Cases
Stickle allows you to embed customer analytics and engagement functionality in your Laravel application. Use it to:
- Build real-time customer analytics dashboard;
- Trigger Laravel notifications based on end-user behavior;
- Highlight important customer behavior in your admin panel;
- Segment your customer base to identify high value or at-risk customers in realtime.
Stickle Apps allow you to do even more.
Stickle Core
Stickle Core is the foundation of Stickle that:
- Tracks user attributes and behavior via a Javascript tracking code;
- Logs authentication events;
- Logs changes in model attributes;
- Logs user-defined server-side events;
- Exposes Eloquent methods for querying your customers;
- Exposes a REST API for ingesting events from other channels (Mobile, etc);
- Provides the ability to define customer segments 'as-code' and track these segments over time.
Stickle Apps
Stickle Apps extend the funtionality of Stickle Core. Anyone can write a Stickle app but we'll provide some first-party apps to get people started.
Getting Started
Requirements
Stickle requires:
- PHP 8.3+
- Laravel 11.0+.
Installation
You may use Composer to require Stickle into your PHP project:
composer require stickleapp/core
You may install Stickle into your Laravel project using the following command:
php artisan install:stickle
The installer will guide you through the setup process helping you set configuration options for your project. You can specify:
- If you want to install the Stickle JS SDK and track client events;
- If you want to track events raised by Illuminate\Auth events;
- If you want to track each authenticated event via middleware; and
- How you define the relationships between
UsersandGroupsin your application.
Running Migrations
After you have specified your configuration options in the installation script, run migrations:
php artisan migrate
Initialization
When complete you can run Stickle with the following command:
php artisan run:stickle
This command will does the following:
- activates cron tasks;
- activates websockets server (if applicable).
You can access a test page at the URL specified in the terminal.
Advanced Configuration
Stickle will work out of the box using the configuration options specified during the installation process. You can override these (and several other) options in the config\stickle.php file.
Database Options
You can specify the following configuration options:
connection. (Defaults toDB_CONNECTIONenv value) This connection should contain the tracked models.tablePrefix. (Defaultlc*) This will be prepended to the tables created by the migrations.
Sync Schedule
Stickle runs several jobs to transform your data. You can update the frequency that these jobs run:
ExportSegments. (Default Every 360 minutes).RecordSegmentStatistics. (Default Every 360 minutes).RecordEntityStatistics. (Default Every 360 minutes).RollupEvents. (Default Every 360 minutes).RollupPageViews. (Default Every 360 minutes).RollupSessions. (Default Every 360 minutes).
Customer Models
User. By default, Stickle assumes theApp\Models\Userclass is the user responsible for authentication events. You can override this class.Group. You can optionally specify a Group class that represents a real world company, account, organization, etc. that aUserbelongs to.Relationship. You should specify the relationship between theGroupand theUser. By default, the relationship isIlluminate\Database\Eloquent\Relations\HasManymeaning eachGrouphas zero or moreUsersobjects. Other options include:Illuminate\Database\Eloquent\Relations\HasOne. EachUserbelongs to oneGroupand eachGrouphas exactly oneUser.Illuminate\Database\Eloquent\Relations\BelongsToMany. EachUsercan belong to zero or moreGroupsand eachGroupcan have have zero or moreUsers.
Payment. You can optionally specify a Payment model that represents a payment made by a StickleEntity model to your organization.
Tracking Options
Stickle can track requests and events on the server and on the client. There are several configuration options that determine the behavior of each method:
Server
loadMiddleware. Defaulttrue. Whentrue, Stickle loads middleware during the Package Service Provider'sbootmethod.trackAuthenticationEvents. Defaulttrue. Automatically log all authenticatedIlluminate\Authevents.trackRequests. Defaulttrue. Automatically track all authenticated requests made in the application.
Client
loadMiddleware. Defaulttrue. Whentrue, Stickle injects a tracking code via middleware during the Package Service Provider'sbootmethod.trackPageViews. Defaulttrue. Whentrue, the Javascript tracking code will listen for pushState changes and record a pageview for each.routePrefix. Default''. Tracking events are sent to the/requestendpoint by default. If you move this endpoint to a different location, updateroutePrefixto reflect this location.
Paths
Where to autoload Segments (ActiveAccounts.php) and export them.
Where to autoload Listeners
Where to autoload Playbooks (ActiveAccounts.php) and export them (Move to => Stickle Playbooks)
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.
stickleapp/core 适用场景与选型建议
stickleapp/core 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 1.86k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 08 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「D Clay Smith」 「stickle.app」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 stickleapp/core 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 stickleapp/core 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 stickleapp/core 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Add copy, paste and clone functionality to Matrix blocks.
Compare two string and get a similarity percentage
Compare two string and get a similarity percentage
Alfabank REST API integration
Compare between two strings and get a similarity percentage
Laravel package for Accurate Online API integration.
统计信息
- 总下载量: 1.86k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 11
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-08-01