Download the PHP package margatampu/laravel-inspector without Composer

On this page you can find all versions of the php package margatampu/laravel-inspector. 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-inspector

laravel-inspector

Latest Version on Packagist Total Downloads

Watching and observing requests, logs, and listed models to maintain all possible activities. Laravel inspector use to do it and storing data in separate database.

Installation

Require this package with composer.

Integration

Package tested and worked with Laravel and Lumen framework (5.7+).

Laravel: After installation using composer finishes up, you'll have to add the following line to your config/app.php:

Lumen: For Lumen, you'll have to add the following line to your bootstrap/app.php:

Laravel: Then copy inspector config file from laravel-inspector to your config folder:

Lumen: For Lumen, you need to copy file manually to your config folder and enable it in bootstrap/app.php:

After configuration, migrate all necessary database structure from laravel-inspector with (prerequisite setting database in .env file):

To make sure laravel-inspector running securily, you need to generate inspector auth token using console command line with default value:

It will generate a random key, and you need to store it in your .env file.

Last step for your integration, you need to add this line to your routes\api.php file to use laravel-inspector api route to handle storing data to database.

Configuring config file

For your models activity, you need to listing all your models you want to watched. Placed all your models in config\inspector.php file inside models element.

Setup env file

After installation and some integration, you need to update setup in your .env file. Besides database setting, you can add variable:

Don't forgot to change your APP_URL as well with your current application domain url. It is use as api route url to store all your inspector data.

Go Ahaed

For expert use, you can ignore last step for integration steps for copying inspector API, and copied laravel-inspector api routes manually to your routes/api.php file and use your own controller to maintain data before store to database.

Then, you can store your destination url in .env file using this variables:

Migration Customization

If you plan to separate service and consumer, you can ignore migrations of inspector package to prevent project migrate unnecessary tables to your consumer database. You should call the Inspector::ignoreMigrations method in the register method of your AppServiceProvider.

Queueing Jobs

To prevent inspector slowing your projects, you can queueing inspector jobs using separate queue name inspector. You can run single queue worker for it using this command:

Usage

To use this package, after all integration steps done. You will have your requests, logs and models activity in database.

Console Command

You did run inspector:auth command before to generate new inspector default auth token. Beside it, we have several commands available:

You can custom your own inspector auth name using this command:

You allowed to rename your existing inpector auth name using: Note: Replace {\$id} with your inspector auth id

Like inspector auth name, you also allowed to change token or refresh it using: Note: Replace {\$id} with your inspector auth id

Testing

For some laravel/lumen project, this package still not stable in some parts. If you want to test this package, you have several command to test it.

You can run a single command to run test all modules (model, log, and request).

Since you can enable and disable module in configuration file, you also enable to run single module too.

Prerequisit for testing modules

To ensure your package test module run smoothly, you need to recheck some configurations:

  1. Since the package test using running database (not separated test database), please change your current database to new fresh database or you will need to delete inserted data manually.
  2. Queue connection using sync. Use connection besides it will force test to exit.
  3. Check if module enable for model, log, and/or request. Disable module will not run test for it.
  4. For model module test, package use User class model, so you need to ensure that User model and factory are available for use. But if you disable model module, you can skip this step.
  5. For request module test, package use guzzle/http to acces your main page (url('/')), please ensure that url exist to access. But if you disable request module, you can skipt this step too.

License

This laravel-teams-logging package is available under the MIT license. See the LICENSE file for more info.


All versions of laravel-inspector with dependencies

PHP Build Version
Package Version
Requires php Version ^7.0
guzzlehttp/guzzle Version ^6.3
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 margatampu/laravel-inspector contains the following files

Loading the files please wait ....