Download the PHP package aungmyat/report without Composer

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

This is report system

There are 4 simple steps to complete this package after installing.

Installation =

(composer require aungmyat/report:v2.0.1)

  1. add following Serviceprovider in config/app.php.

    \Aungmyat\Report\ReportServiceProvider::class,

  2. Set up Mail in .env

  3. If You are not set up Queue.
    • Set up driver for QueueConnection in .env {Change => database}
    • Run (php artisan queue:table)
    • Run (php artisan migrate)

4 . Usage

  * use Aungmyat\Report\Process_provider\reportingProcess;

public function method()

 {

    //method 1
    // if(!$request->download_date){
    //     $start_date = Carbon::now()->format('Y-m-d').' 00:00:00';
    //     $end_date = Carbon::now()->format('Y-m-d').' 23:59:59';
    // }else{
    //     $start_date = Carbon::parse($request->download_date)->format('Y-m-d').' 00:00:00';
    //     $end_date = Carbon::parse($request->download_date)->format('Y-m-d').' 23:59:59';
    // }

    //  $query = "select car_cycle_infos.vehicle_license_number as license_number,liter,amount,vehicle_types.name AS category_type_name,shop_name,smart_card_number from `petro_shop_sale_records` left join `petro_shops` on `petro_shop_sale_records`.`petro_shop_id` = `petro_shops`.`id` left join `vehicles` on `petro_shop_sale_records`.`vehicle_id` = `vehicles`.`id` left join `car_cycle_infos` on `vehicles`.`vehicleable_id` = `car_cycle_infos`.`id` left join `vehicle_types` on `petro_shop_sale_records`.`category_type` = `vehicle_types`.`id` where `petro_shop_sale_records`.`created_at` >= '$start_date' and `petro_shop_sale_records`.`created_at` <= '$end_date'";
    //  $main_table = null;
    //  $join_tables = [];
    //  $extra = [];
    //  $columns  = ['car_cycle_infos.vehicle_license_number as license_number','liter','amount','vehicle_types.name AS category_type_name','shop_name','smart_card_number'];
    //  $filename = 'sale_record.xlsx';
    //  $senderemail = '[email protected]';
    //  $limit       = 5000;  //Optional 
    //  $subject     = 'Your email subject';

    // method 2 => if you don't want to use custom query , you can use this code.

    if(!$request->download_date){
        $start_date = Carbon::now()->format('Y-m-d').' 00:00:00';
        $end_date = Carbon::now()->format('Y-m-d').' 23:59:59';
    }else{
        $start_date = Carbon::parse($request->download_date)->format('Y-m-d').' 00:00:00';
        $end_date = Carbon::parse($request->download_date)->format('Y-m-d').' 23:59:59';
    }
    $query = null;
    $main_table = 'petro_shop_sale_records';
    $join_tables = [
        [
            'table_name' => 'petro_shops',
            'foreign_key' => 'petro_shop_id',
            'nested_join' => []

        ],
        [
            'table_name' => 'vehicles',
            'foreign_key' => 'vehicle_id', //key store in main table , petro_shop_sale_records will be the main table for this join
            'nested_join' => [
                [
                    'table_name' => 'car_cycle_infos',
                    'foreign_key' => 'vehicleable_id',//key store in main table , vehicles will be the main table for this join
                    'nested_join' => []
                ]
            ]
        ],
        [
            'table_name' => 'vehicle_types',
            'foreign_key' => 'category_type',
            'nested_join' => []

        ],
    ];

    //optional default value = []
    $extra = [
        'created_at' => [
            'start_date' => $start_date,
            'end_date' => $end_date
        ], // if you want date range , you can use this parameter and exactly same as this example format. column name created_at is the column name in your table.
    ]; 

    // if you don't want to use custom query , you can use this code.
    //end here

    $columns  = ['car_cycle_infos.vehicle_license_number as license_number','liter','amount','vehicle_types.name AS category_type_name','shop_name','smart_card_number'];
    $filename = 'sale_record.xlsx';
    $senderemail = '[email protected]';
    $limit       = 5000;  //Optional 

   //# This parameter($limit) will decide to download your report from browser if your
   // report  data is less than your limit.if not so, it will send from email. 

    $subject     = 'Your email subject';

    $response = reportingProcess::process($filename,$columns,$senderemail,$limit, $subject , $extra, $main_table , $join_tables , $query);
    return $response;
}

Warning ### { You can install this package only via composer version-2.}


All versions of report with dependencies

PHP Build Version
Package Version
Requires maatwebsite/excel Version ^3.1
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 aungmyat/report contains the following files

Loading the files please wait ...