Skip to content
This repository has been archived by the owner on Sep 5, 2021. It is now read-only.
/ dblog Public archive

This package will help to keep log in database with type.

License

Notifications You must be signed in to change notification settings

abhishekKrHaith11/dblog

Repository files navigation

dblog

Latest Stable Version Total Downloads Latest Unstable Version License

This package will help to keep log in database with type for Laravel applications.

Installation

Via Composer

$ composer require abhishekkrhaith11/dblog

Usage

After installation you need to add the following line to config/app.php -

'providers' => [
	/*
     * Package Service Providers...
     */
    Abhishekkrhaith11\Dblog\DblogServiceProvider::class,
]

If you want to use alias add the following -

'aliases' => [
	/*
     * Package Facades...
     */
    'Dblog' => Abhishekkrhaith11\Dblog\Facades\Dblog::class,
]

After setup you need migrate the database using

$ php artisan migrate

You can change the database table name before migration. For that you have to publish configs. use -

$ php artisan vendor:publish --provider=Abhishekkrhaith11\Dblog\DblogServiceProvider

Documentation

Available log methods -

Dblog::emergency(string $msg);
Dblog::alert(string $msg);
Dblog::critical(string $msg);
Dblog::error(string $msg);
Dblog::warning(string $msg);
Dblog::notice(string $msg);
Dblog::info(string $msg);
Dblog::debug(string $msg);

To retrive logs use -

Dblog::logs(string $type);

This will return a array of all logs found in log table. Each log will contain log type, message and log time.

Support

If you found any issues you can report in github issues.

License

MIT. Please see the license file for more information.

About

This package will help to keep log in database with type.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages