Download the PHP package tommyys/laravel_library without Composer
On this page you can find all versions of the php package tommyys/laravel_library. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download tommyys/laravel_library
More information about tommyys/laravel_library
Files in tommyys/laravel_library
Package laravel_library
Short Description Default Laravel library for Axstarzy Dot Com that includes the most used libraries, plugins, helper classes, and migrations
License
Informations about the package laravel_library
Axstarzy Laravel Library
Default Laravel library for Axstarzy Dot Com that includes the most used libraries, plugins, helper classes, and migrations
Getting Started
Note that this package is in constant development and update. Please do voice out if you have any suggestions for improvement on this package.
This package is meant for Laravel Framework 5.5 LTS and above.
The following packages will be auto installed:
- guzzlehttp/guzzle^6.3
- intervention/image^2.4
- laravelcollective/html^5.4.0
- funkjedi/composer-include-files^1.0,
Helper classes included:
- Action Log
- Error Log
Helper functions included:
- sqlLog
- custom trans
- getStatusLabel
Prerequisites
- PHP 7.0 and above
- Laravel 5.5 and above
Installing
-
Install the package in your project
-
Add your providers to the
providers
array ofconfig/app.php
: -
Add class aliases to the
aliases
array ofconfig/app.php
: -
To use the included helper class, add this line into your project's
composer.json
. -
Run
composer dumpautoload
- Run
php artisan migrate
to migrate the required tables
Using the library
To use the included classes, include the namespace on top of your controller/command.
Below are the classes that are available:
- ActionLog
- ErrorLog
- Telegram
Then you may use it normally like a helper class in your controller/commands.
To setup Telegram, add these variables to your .env
file
Helper
trans()
This package includes an updated trans
function, you must have added vendor/tommyys/laravel_library/src/Helper.php
to composer.json
to have it working.
Example:
Output:
output()
This function will run echo
and Log::info
together.
sqlLog()
Accepts model/eloquent object as input. This helper function will form a full sql query including parameters to ease troubleshooting in MYSQL.
Example:
Output:
roundDownDecimal($number, $decimals = 2, $dec_point = '.', $thousands_point = ',')
This helper function works like number_format. except that it does not round up the decimals.
Example:
All versions of laravel_library with dependencies
guzzlehttp/guzzle Version ^6.2
intervention/image Version ^2.4
laravelcollective/html Version >=5.1.0
funkjedi/composer-include-files Version ^1.0