PHP code example of willpower232 / cloverparser-laravel

1. Go to this page and download the library: Download willpower232/cloverparser-laravel library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

willpower232 / cloverparser-laravel example snippets


use WillPower232\CloverParserLaravel\CloverParser;

$urlToSVG = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($pathToCloverFile)
	->storeImage();

use WillPower232\CloverParserLaravel\CloverParser;

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($pathToCloverFile);

$urlToSVG = $parser->storeImage();

$urlToFile = $parser->store("$branch.clover", file_get_contents($pathToCloverFile));

$file = new \Illuminate\Http\File($pathToCloverFile);

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($file);

$urlToFile = $parser->store("$branch.clover", $file);

$file = $request->file('file');

$parser = app(CloverParser::class)
	->setPath($project, $branch)
	->addFile($file);

$urlToFile = $parser->store("$branch.clover", $file);