Download the PHP package dcodegroup/laravel-xero-leave without Composer

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

Laravel Xero Leave

This package provides the standard xero functionality for sending leave applications to Xero.

This package provides

How it works

Follow the installation instructions. Select set if you want to approval requests The events that are fired

Events

Installation

You can install the package via composer:

Then run the install command.

This will publish the configuration file and the migrations.

Then run the migrations

The following table will be added to your project

Configuration

Most of configuration has been set the fair defaults. However you can review the configuration file at config/laravel-xero-leave.php and adjust as needed

Usage

You should implement your own frontend to this package. However the model and the events etc are already fired for you. Below will guide you through what you need to do.

Create your own Leave::class model class that extends the packages model.

Ensure to add the following trait to the model you will use leave with. eg App\Models\User::class

Example Vue component to update the status of leave that require approval

Routes

Below lists the routes available within this package. It is suggested you check the middleware used and update the configuration accordingly.

xero_leave.update-status updates the status used for sending to xero when approval is required. xero_leave.retry-sync is an endpoint that can be used to retry sending a leave request to xero in case there was an issue.

HTTP Resources

When returning the data for Leave you most likely are using a resource. There are some elements you should add to your leave resources. See example below.

Events

Communicating with Xero works by firing events. These events have listeners which will fire the listeners and dispatch jobs.

All events accept the Leave::class as the only parameter.

SendLeaveToXero::class send the leave record to Xero. This has a listener blah then then dispatches the job SendToXero LeaveApproved::class When the leave is changed to approved it will fire this event. This will trigger the sending leave to xero LeaveDeclined::class When the leave is changed to un-approved it will fire this event. This will trigger the sending leave to xero (normally an update of the current application) RequestLeaveApproval::class If the configuration parameter laravel-xero-leave.applications_require_approval is true and a new leave request is created then this event will be fired. You can listen to it in your own application fire a notification or email informing who action needs taking.

A request class is already present in this package. You can update and use the code below for your store and update classes in your own controllers.

Jobs

Commands

laravel-xero-leave:install publishes the configuration file and the migrations

laravel-xero-leave:update-xero-configuration-data will fetch and store the leave types in the database. You can use `--force to ensure it runs now.

You should add it to your app/Console/Kernel.php file to run it once a day. You could run it more often if wanted with the --force flag

Resources

There is no ability to delete a leave application through the Xero API. More information here https://developer.xero.com/documentation/api/payrollau/leaveapplications/#currently-unsupported-features.


All versions of laravel-xero-leave with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4||^8.0
laravel/framework Version ^7.0|^8.0|^9.0|^10.0|^11.0
dcodegroup/laravel-configuration Version ^0.2
dcodegroup/laravel-xero-employee Version ^0.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 dcodegroup/laravel-xero-leave contains the following files

Loading the files please wait ....