Download the PHP package porro/laravel-connector without Composer

On this page you can find all versions of the php package porro/laravel-connector. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-connector

porro/laravel-connector

Site health for Laravel, free on a /porro page: health, activity and blocking, beside the real Site health tab

Site health, suspicious activity and blocking for Laravel 10–13, on its own /porro page. It checks the site for the things that quietly go wrong between deploys (security advisories in your Composer packages, PHP and Laravel versions running out of security support, a scheduler that isn't running, debug mode left on in production, migrations not run, failed jobs, stale backups) and tells you what to do about each. It also spots who's probing the site for secrets, trying passwords or flooding its forms, and lets you block them in a click.

It's free and works on its own, with no account. If you use Porro to look after your sites, connecting it adds what can only be seen from outside: uptime, SSL certificates, domain expiry and the server's operating system, with alerts by email or Slack.

On Filament or Statamic? Use Porro Site Health for Filament or Porro Site Health for Statamic instead. They include everything here and show it in your control panel. Install this package on its own and porro:status points you to the right one.

Install

The migration adds the porro_blocklist, porro_safelist, porro_cache and porro_settings tables. Then visit /porro. It's open in the local environment; anywhere else it needs a gate first (see The /porro page).

The scheduler check, activity batching and nginx mode run on Laravel's scheduler, which needs one cron line. If it isn't running yet, php artisan porro:cron adds it to the server's crontab for you, from the project folder (the current folder on zero-downtime deploys). If it can't, it prints the line to add yourself. See Scheduling reports for Forge, Ploi, Laravel Cloud, Vapor and other hosts.

What it checks

On the site itself, with no account, through Porro\Laravel\SiteHealth:

Results are cached for five minutes; the public data behind them for between six hours and a day. The Statamic and Filament connectors show the same checks as a panel in the control panel.

The /porro page

Visit /porro for three tabs:

Locked down by default. In the local environment anyone can open it. Anywhere else it returns 403 unless your app defines a viewPorro gate and the gate allows the signed-in user. Guests never get in. With no gate, production is closed to everyone. Define the gate in a service provider's boot():

Changing the lists also checks a managePorroBlocklist gate when you define one. Without it, anyone who can view the page can change the lists. The routes for connecting to Porro from the page (/porro/connect) need a connectPorro gate and are closed until you define it; the page has no button for them yet.

Suspicious activity and blocking

The Activity tab of the /porro page: the suspicious activity summary and the IPs worth a look, each with Block 7 days, Block permanently and Safelist buttons

Works without a Porro account. IP addresses aren't sent to Porro, and stay on the site apart from the lookups and Cloudflare blocking listed under Where IP addresses go.

IP details on the /porro page: an address pretending to be Googlebot, caught by its hostname, with buttons to block it or safelist it

The Blocking tab of the /porro page: blocking in the app, at Cloudflare and in nginx, above the blocklist

Where IP addresses go

IP addresses are never in the report to Porro. They leave the server only in these cases:

Countries, the Tor and Spamhaus badges and the protected ranges are matched on the server, against files and lists it downloads.

Connect Porro (optional)

Porro watches every site you look after from outside: uptime from several regions, SSL and domain expiry, the server's OS and security updates, with alerts by email or Slack. It's a separate service with its own account; see porro.dev for plans. Nothing in this package needs it, and nothing is sent to Porro until you connect. Add the site in Porro and copy its site key, then:

porro:connect writes PORRO_KEY to .env and sends the first report. The Site health tab then shows the site's open findings in Porro (uptime, SSL, the domain, the server's OS and packages) alongside the checks above, each linking into Porro.

The site key can also come from Connect to Porro in the Statamic control panel, which needs no key to copy: the key is made on the site and kept in its porro_settings table, encrypted with the app key. PORRO_KEY in the environment wins when it's set. php artisan porro:status says which one is in use.

Reports then go every 15 minutes on the scheduler. If it isn't running, porro:connect offers to add the cron line, as porro:cron does. Use --cron to add it without asking (handy in provisioning scripts) or --no-cron to leave the crontab alone. Connected from another machine? Run php artisan porro:cron on the server; it needs no key, and once the site is connected it sends a report straight away. On Laravel Cloud and Vapor, set PORRO_KEY as an environment variable instead.

Add php artisan porro:report to your deploy script so Porro hears about deploys straight away.

Each report is signed and read-only: it never changes the site and never accepts commands, and Porro never connects in.

Scheduling reports

Laravel's scheduler needs to run php artisan schedule:run from the project folder every minute. Reports, the scheduler check and activity batching all run on it.

php artisan porro:cron adds the line to the server's crontab for you, or tells you it's already there. Once the site is connected it also sends a report straight away, so Porro stops saying cron is missing without waiting for the first scheduled one. If it can't reach the crontab, it prints the line to add by hand, using one of the guides below.

Zero-downtime deploys (Forge, Envoyer, Ploi, Deployer): always point cron at the current folder, e.g. /home/forge/example.com/current, never a releases/… folder. A release folder runs old code after the next deploy and stops working once it's cleaned up, with no error you'd see. php artisan porro:cron uses current for you.

Laravel Forge Open the site and turn on **Laravel scheduler** in its Laravel settings. That's all: Forge adds the every-minute `schedule:run` job for the site, from the right folder. To add it by hand instead, go to the server's **Scheduler** and add a **New scheduled job**: - **Command:** `php /home/forge/example.com/current/artisan schedule:run`. Leave out `/current` if the site doesn't use zero-downtime deploys. On an isolated site, use the site's own user in the path. - **User:** `forge`, or the site's isolated user. Never `root`. - **Frequency:** every minute. If you add sites through Porro's one-click install on Forge, it turns on the Laravel scheduler for you when the Forge API token has the optional `server:create-schedulers` scope.
Ploi Open the server's **Cronjobs** and add one: - **Command:** `php /home/ploi/example.com/artisan schedule:run`, with `/current` before `/artisan` on zero-downtime sites. - **User:** `ploi`, or the site's own user. - **Frequency:** every minute.
Laravel Cloud There's no crontab. Open the environment, edit the **App** cluster and turn on **Scheduler**. Cloud then runs `schedule:run` every minute. Set `PORRO_KEY` as an environment variable rather than running `porro:connect` there.
Laravel Vapor Vapor runs the scheduler for you unless `vapor.yml` sets `scheduler: false`. Leave it on, and set `PORRO_KEY` as an environment variable.
Envoyer Envoyer deploys but doesn't run cron. Add the job on the server itself (Forge's Scheduler, or `crontab -e`), pointing at Envoyer's `current` folder: `php /home/forge/example.com/current/artisan schedule:run`.
cPanel or Plesk - **cPanel:** **Advanced → Cron Jobs**. Choose **Once Per Minute** and use `cd /home/user/example.com && php artisan schedule:run > /dev/null 2>&1`. - **Plesk:** **Websites & Domains → Scheduled Tasks → Add Task**. Choose **Run a command**, **Cron style** `* * * * *`, and the same command. If `php` isn't found, or runs an older PHP than the site, use the full path your host lists for the site's PHP version.
Any other server (crontab) Run `crontab -e` as the user that owns the site (not root) and add: Use the `current` path on zero-downtime deploys.

What leaves a site

Only once connected, in the report every 15 minutes:

Reading the site's findings back from Porro is a GET signed with the same key; it never sends anything about the site.

What never does

Content, customer or user data, environment values or secrets. Run php artisan porro:status --json to see the exact report your site would send.

Commands

Command Does
porro:connect <key> Saves the key, sends the first report and sets up cron (--cron, --no-cron)
porro:cron Adds the scheduler to the crontab on its own, no key needed. Sends a report straight away once connected
porro:report Sends a report now (--packages forces the package list)
porro:status Shows what the next report contains (--json for the raw report)
porro:block <ip> Blocks an IP or range (--reason, --days; --remove unblocks)
porro:blocklist-sync Tidies the blocklist and writes the nginx deny file
porro:cloudflare [status\|connect\|sync\|disconnect] Blocks at Cloudflare's edge

Config

Env Default
PORRO_KEY The site key
PORRO_INTERVAL 15 Minutes between reports
PORRO_ENABLED unset true or false to force reporting on or off
PORRO_FAILED_JOB_MESSAGES false Send the first line of failed jobs' exception messages, redacted
PORRO_ACTIVITY unset Record suspicious activity; unset means production only
PORRO_ACTIVITY_BUFFER storage/porro/activity.buf Where this server keeps suspicious requests until they're recorded. false records each one straight away
PORRO_ACTIVITY_STORE Porro's porro_cache table The cache store for activity, the Cloudflare connection and nginx check-ins. Never the app's default store, which deploys clear
PORRO_BLOCK_APP true Turn blocked IPs away with a 403
PORRO_BLOCK_NGINX false Write the nginx deny file every minute
PORRO_PROTECT_FORGE true Never block Laravel Forge's servers and health checks. Set false if the site isn't on Forge
PORRO_PROTECT_CRAWLERS true Never block Google's and Bing's verified crawlers
PORRO_NGINX_PATH storage/porro/nginx-blocklist.conf Where the deny file goes
PORRO_NGINX_REAL_IP on behind Cloudflare Put Cloudflare's real IP lines in the deny file. Set false if your nginx config already has real_ip_header
PORRO_CLOUDFLARE_TOKEN Cloudflare API token for WAF mode
PORRO_CLOUDFLARE_HOST APP_URL's host The host whose Cloudflare zone gets the rule
PORRO_ABUSEIPDB_KEY AbuseIPDB key, for the reputation check on IP details
PORRO_PAGE unset The /porro page: unset means on, except alongside the Statamic or Filament connector
PORRO_PATH porro Where the page lives

The safelist, extra protected ranges, thresholds and the paths your app really serves go in config/porro.php under activity and blocklist.

With PORRO_ENABLED unset, only APP_ENV=production (or prod, live) reports. A local or staging copy running with the live .env stays quiet, so it can't overwrite the live site's state in Porro. Set PORRO_ENABLED=true to report from another environment on purpose. porro:status shows whether reporting is on and why.

Developing

Security

Please email [email protected] rather than opening an issue. We reply within one working day.

License

MIT


All versions of laravel-connector with dependencies

PHP Build Version
Package Version
Requires php Version ^8.2
guzzlehttp/guzzle Version ^7.2
illuminate/console Version ^10.0|^11.0|^12.0|^13.0
illuminate/http Version ^10.0|^11.0|^12.0|^13.0
illuminate/support Version ^10.0|^11.0|^12.0|^13.0
porro/php-core Version ^0.3.9
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package porro/laravel-connector contains the following files

Loading the files please wait ...