You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of experience, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+
## Our Standards
8
+
9
+
Examples of behavior that contributes to creating a positive environment include:
10
+
11
+
* Using welcoming and inclusive language
12
+
* Being respectful of differing viewpoints and experiences
13
+
* Gracefully accepting constructive criticism
14
+
* Focusing on what is best for the community
15
+
* Showing empathy towards other community members
16
+
17
+
Examples of unacceptable behavior by participants include:
18
+
19
+
* The use of sexualized language or imagery and unwelcome sexual attention or advances
20
+
* Trolling, insulting/derogatory comments, and personal or political attacks
21
+
* Public or private harassment
22
+
* Publishing others' private information, such as a physical or electronic address, without explicit permission
23
+
* Other conduct which could reasonably be considered inappropriate in a professional setting
24
+
25
+
## Our Responsibilities
26
+
27
+
Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.
28
+
29
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.
30
+
31
+
## Scope
32
+
33
+
This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.
34
+
35
+
## Enforcement
36
+
37
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at [email protected]. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
38
+
39
+
Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.
40
+
41
+
## Attribution
42
+
43
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, available at [http://contributor-covenant.org/version/1/4][version]
However, not every pull request will automatically be accepted. I will review each carefully to make sure it is in line with
8
+
the direction I want the package to continue in. This might mean that some pull requests are not accepted, or might stay
9
+
unmerged until a place for them can be determined.
10
+
11
+
## Testing
12
+
-[ ] After making your changes, make sure the tests still pass.
13
+
-[ ] When adding new functionality, also add new tests.
14
+
-[ ] When fixing errors write and satisfy new unit tests that replicate the issue.
15
+
-[ ] Make sure there are no build errors on our CI server (https://ci.genealabs.com/build-status/view/11)
16
+
-[ ] All code must past PHPCS and PHPMD PSR2 validation.
17
+
18
+
## Submitting changes
19
+
When submitting a pull request, it is important to make sure to complete the following:
20
+
-[ ] Add a descriptive header that explains in a single sentence what problem the PR solves.
21
+
-[ ] Add a detailed description with animated screen-grab GIFs visualizing how it works.
22
+
-[ ] Explain why you think it should be implemented one way vs. another, highlight performance improvements, etc.
23
+
24
+
## Coding conventions
25
+
Start reading our code and you'll get the hang of it. We optimize for readability:
26
+
- indent using four spaces (soft tabs)
27
+
- use Blade for all views
28
+
- avoid logic in views, put it in controllers or service classes
29
+
- ALWAYS put spaces after list items and method parameters (`[1, 2, 3]`, not `[1,2,3]`), around operators (`x += 1`, not `x+=1`), and around hash arrows.
30
+
- this is open source software. Consider the people who will read your code, and make it look nice for them. It's sort of like driving a car: Perhaps you love doing donuts when you're alone, but with passengers the goal is to make the ride as smooth as possible.
31
+
- emphasis readability of code over patterns to reduce mental debt
32
+
- always add an empty line around structures (if statements, loops, etc.)
Copy file name to clipboardExpand all lines: README.md
+78-48Lines changed: 78 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# MixPanel for Laravel 5
2
2
[](https://gitter.im/GeneaLabs/laravel-mixpanel?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- Page view tracking has been removed in favor of Mixpanels in-built Autotrack functionality, which tracks all page views. To turn it on, visit your Mixpanel dashboard, click *Applications > Autotrack > Web > etc.* and enable Autotracking.
78
77
79
-
## Usage
80
-
### PHP Events
81
-
82
-
### Stripe Web-Hook
83
-
If you wish to take advantage of the Stripe web-hook and track revenue per user,
84
-
you should install Cashier: https://www.laravel.com/docs/5.5/billing
85
-
86
-
Once that has been completed, exempt the web-hook endpoint from CSRF-validation
87
-
in `/app/Http/Middleware/VerifyCsrfToken.php`:
88
-
```php
89
-
protected $except = [
90
-
'genealabs/laravel-mixpanel/stripe',
91
-
];
92
-
```
93
-
94
-
The only other step remaining is to register the web-hook with Stripe:
95
-
Log into your Stripe account: https://dashboard.stripe.com/dashboard, and open
96
-
your account settings' webhook tab:
97
-
98
-
Enter your MixPanel web-hook URL, similar to the following: `http://<your server.com>/genealabs/laravel-mixpanel/stripe`:
99
-

100
-
101
-
Be sure to select "Live" if you are actually running live (otherwise put into test mode and update when you go live).
102
-
Also, choose "Send me all events" to make sure Laravel Mixpanel can make full use of the Stripe data.
103
-
104
-
### JavaScript Events & Auto-Track
105
-
#### Blade Template (Recommended)
106
-
First publish the necessary assets:
107
-
```sh
108
-
php artisan mixpanel:publish --assets
109
-
```
110
-
111
-
Then add the following to the head section of your layout template (already does
112
-
the init call for you, using the token from your .env file):
Out of the box it will record the common events anyone would want to track. Also, if the default `$user->name` field is
170
167
used that comes with Laravel, it will split up the name and use the last word as the last name, and everything prior for
@@ -340,3 +337,36 @@ Out of the box it will record the following Stripe events in MixPanel for you:
340
337
- Churned: <date plan was downgraded>
341
338
- Plan When Churned: <plan name prior to downgrading>
342
339
```
340
+
341
+
# The Fine Print
342
+
## Commitment to Quality
343
+
During package development I try as best as possible to embrace good design and
344
+
development practices to try to ensure that this package is as good as it can
345
+
be. My checklist for package development includes:
346
+
347
+
- ✅ Achieve as close to 100% code coverage as possible using unit tests.
348
+
- ✅ Eliminate any issues identified by SensioLabs Insight and Scrutinizer.
349
+
- ✅ Be fully PSR1, PSR2, and PSR4 compliant.
350
+
- ✅ Include comprehensive documentation in README.md.
351
+
- ✅ Provide an up-to-date CHANGELOG.md which adheres to the format outlined
352
+
at <http://keepachangelog.com>.
353
+
- ✅ Have no PHPMD or PHPCS warnings throughout all code.
354
+
355
+
## Contributing
356
+
Please observe and respect all aspects of the included Code of Conduct <https://github.com/GeneaLabs/laravel-model-caching/blob/master/CODE_OF_CONDUCT.md>.
357
+
358
+
### Reporting Issues
359
+
When reporting issues, please fill out the included template as completely as
360
+
possible. Incomplete issues may be ignored or closed if there is not enough
361
+
information included to be actionable.
362
+
363
+
### Submitting Pull Requests
364
+
Please review the Contribution Guidelines <https://github.com/GeneaLabs/laravel-model-caching/blob/master/CONTRIBUTING.md>.
365
+
Only PRs that meet all criterium will be accepted.
366
+
367
+
## ❤️ Open-Source Software - Give ⭐️
368
+
We have included the awesome `symfony/thanks` composer package as a dev
369
+
dependency. Let your OS package maintainers know you appreciate them by starring
370
+
the packages you use. Simply run composer thanks after installing this package.
371
+
(And not to worry, since it's a dev-dependency it won't be installed in your
0 commit comments