Skip to content

Commit da0d77c

Browse files
committed
Initial Commit
1 parent 5da3007 commit da0d77c

22 files changed

+154
-561
lines changed

.github/FUNDING.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
github: :vendor_name
1+
github: ziming

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
blank_issues_enabled: false
22
contact_links:
33
- name: Ask a question
4-
url: https://github.com/:vendor_slug/:package_name/discussions/new?category=q-a
4+
url: https://github.com/ziming/laravel-memory-health-check/discussions/new?category=q-a
55
about: Ask the community for help
66
- name: Request a feature
7-
url: https://github.com/:vendor_slug/:package_name/discussions/new?category=ideas
7+
url: https://github.com/ziming/laravel-memory-health-check/discussions/new?category=ideas
88
about: Share ideas for new features
99
- name: Report a security issue
10-
url: https://github.com/:vendor_slug/:package_name/security/policy
10+
url: https://github.com/ziming/laravel-memory-health-check/security/policy
1111
about: Learn how to notify us for sensitive bugs

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
All notable changes to `:package_name` will be documented in this file.
3+
All notable changes to `laravel-memory-health-check` will be documented in this file.

LICENSE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) :vendor_name <author@domain.com>
3+
Copyright (c) ziming <ziming.opensource@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 20 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,68 +1,38 @@
1-
# :package_description
2-
3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
7-
<!--delete-->
8-
---
9-
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
10-
11-
1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
12-
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
13-
3. Have fun creating your package.
14-
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
15-
---
16-
<!--/delete-->
17-
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
1+
# Server Memory Health Check for Spatie Laravel Health Check and Oh Dear
182

19-
## Support us
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/ziming/laravel-memory-health-check.svg?style=flat-square)](https://packagist.org/packages/ziming/laravel-memory-health-check)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/ziming/laravel-memory-health-check/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/ziming/laravel-memory-health-check/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/ziming/laravel-memory-health-check/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/ziming/laravel-memory-health-check/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/ziming/laravel-memory-health-check.svg?style=flat-square)](https://packagist.org/packages/ziming/laravel-memory-health-check)
207

21-
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)
8+
Memory Usage Health Check for Spatie Laravel Health Check Package. In the future I aim to add Memory Load Health Check too.
9+
## Support us
2210

23-
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
11+
You can donate to my github sponsor or use my affiliate link for [Oh Dear](https://ohdear.app/?via=laravel-health-memory). This comes at no extra cost to you and helps support my open source work.
2412

25-
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on [our contact page](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).
13+
https://ohdear.app/?via=laravel-health-memory
2614

2715
## Installation
2816

2917
You can install the package via composer:
3018

3119
```bash
32-
composer require :vendor_slug/:package_slug
33-
```
34-
35-
You can publish and run the migrations with:
36-
37-
```bash
38-
php artisan vendor:publish --tag=":package_slug-migrations"
39-
php artisan migrate
40-
```
41-
42-
You can publish the config file with:
43-
44-
```bash
45-
php artisan vendor:publish --tag=":package_slug-config"
20+
composer require ziming/laravel-memory-health-check
4621
```
4722

48-
This is the contents of the published config file:
23+
## Usage
4924

5025
```php
51-
return [
52-
];
53-
```
26+
// In your Laravel Health Service Provider register() method
5427

55-
Optionally, you can publish the views using
28+
use Spatie\Health\Facades\Health;
29+
use Ziming\LaravelMemoryHealthCheck\UsedMemoryCheck;
5630

57-
```bash
58-
php artisan vendor:publish --tag=":package_slug-views"
59-
```
60-
61-
## Usage
62-
63-
```php
64-
$variable = new VendorName\Skeleton();
65-
echo $variable->echoPhrase('Hello, VendorName!');
31+
Health::checks([
32+
UsedMemoryCheck::new()
33+
->warnWhenUsedSpaceIsAbovePercentage(70)
34+
->failWhenUsedSpaceIsAbovePercentage(90),
35+
]);
6636
```
6737

6838
## Testing
@@ -85,7 +55,7 @@ Please review [our security policy](../../security/policy) on how to report secu
8555

8656
## Credits
8757

88-
- [:author_name](https://github.com/:author_username)
58+
- [ziming](https://github.com/ziming)
8959
- [All Contributors](../../contributors)
9060

9161
## License

composer.json

Lines changed: 14 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": ":vendor_slug/:package_slug",
3-
"description": ":package_description",
2+
"name": "ziming/laravel-memory-health-check",
3+
"description": "Memory Health Check for Spatie Laravel Health Check and Oh Dear",
44
"keywords": [
5-
":vendor_name",
5+
"ziming",
66
"laravel",
7-
":package_slug"
7+
"laravel-memory-health-check"
88
],
9-
"homepage": "https://github.com/:vendor_slug/:package_slug",
9+
"homepage": "https://github.com/ziming/laravel-memory-health-check",
1010
"license": "MIT",
1111
"authors": [
1212
{
13-
"name": ":author_name",
14-
"email": "author@domain.com",
13+
"name": "ziming",
14+
"email": "ziming.opensource@gmail.com",
1515
"role": "Developer"
1616
}
1717
],
@@ -21,27 +21,28 @@
2121
"illuminate/contracts": "^11.0||^12.0"
2222
},
2323
"require-dev": {
24+
"larastan/larastan": "^3.0",
2425
"laravel/pint": "^1.14",
2526
"nunomaduro/collision": "^8.8",
26-
"larastan/larastan": "^3.0",
2727
"orchestra/testbench": "^10.0.0||^9.0.0",
2828
"pestphp/pest": "^4.0",
2929
"pestphp/pest-plugin-arch": "^4.0",
3030
"pestphp/pest-plugin-laravel": "^4.0",
3131
"phpstan/extension-installer": "^1.4",
3232
"phpstan/phpstan-deprecation-rules": "^2.0",
3333
"phpstan/phpstan-phpunit": "^2.0",
34+
"spatie/laravel-health": "^1.34",
3435
"spatie/laravel-ray": "^1.35"
3536
},
3637
"autoload": {
3738
"psr-4": {
38-
"VendorName\\Skeleton\\": "src/",
39-
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
39+
"Ziming\\LaravelMemoryHealthCheck\\": "src/",
40+
"Ziming\\LaravelMemoryHealthCheck\\Database\\Factories\\": "database/factories/"
4041
}
4142
},
4243
"autoload-dev": {
4344
"psr-4": {
44-
"VendorName\\Skeleton\\Tests\\": "tests/",
45+
"Ziming\\LaravelMemoryHealthCheck\\Tests\\": "tests/",
4546
"Workbench\\App\\": "workbench/app/"
4647
}
4748
},
@@ -63,10 +64,10 @@
6364
"extra": {
6465
"laravel": {
6566
"providers": [
66-
"VendorName\\Skeleton\\SkeletonServiceProvider"
67+
"Ziming\\LaravelMemoryHealthCheck\\LaravelMemoryHealthCheckServiceProvider"
6768
],
6869
"aliases": {
69-
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
70+
"LaravelMemoryHealthCheck": "Ziming\\LaravelMemoryHealthCheck\\Facades\\LaravelMemoryHealthCheck"
7071
}
7172
}
7273
},

config/skeleton.php

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)