Download the PHP package fredbradley/annual-leave-widget without Composer

On this page you can find all versions of the php package fredbradley/annual-leave-widget. 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 annual-leave-widget

Annual Leave Dashboard Widget

? A Laravel package for displaying annual leave events from Google Calendar ICS feeds in your Laravel 12/13 application.

Requirements

Installation

Install the package via Composer:

The package will automatically register itself via Laravel's package auto-discovery.

Configuration

1. Publish the Configuration File (Optional)

If you want to customize the configuration, publish the config file:

This will create a config/annual_leave.php file in your application.

2. Add Your Google Calendar ICS URL

Add your Google Calendar ICS URL to your .env file:

How to Get Your Google Calendar ICS URL

  1. Open Google Calendar
  2. Click on the three dots next to the calendar you want to share
  3. Select "Settings and sharing"
  4. Scroll down to "Integrate calendar"
  5. Copy the "Secret address in iCal format" URL

Getting iCal Link

3. Optional Environment Variables

You can also configure the following in your .env file:

Usage

Basic Usage

Once installed and configured, the package automatically registers a route at /annual-leave that displays the widget.

Visit: https://your-app.test/annual-leave

Custom Views

If you want to customize the view, publish the views:

This will create views in resources/views/vendor/annual-leave/ which you can customize.

Using the Widget in Your Own Views

You can also include the widget in your own views:

To get the events in your controller:

JSON API Endpoint

The package also provides a JSON API endpoint for consuming applications:

Endpoint: GET /annual-leave/json

Response Format:

Error Response:

Using the JSON API:

Styling

The widget outputs HTML with the following structure:

You can add your own CSS to style the widget. Events that are currently active (today is between start and end dates) will have the today class applied to the <tr> element.

Configuration Options

The config/annual_leave.php file contains the following options:

Option Environment Variable Default Description
google_calendar_ics_uri GOOGLE_CALENDAR_ICS_URI null The URL to your Google Calendar ICS file
timezone ANNUAL_LEAVE_TIMEZONE Europe/London Default timezone for parsing events
max_events ANNUAL_LEAVE_MAX_EVENTS 12 Maximum number of upcoming events to display
enable_routes ANNUAL_LEAVE_ENABLE_ROUTES true Whether to automatically register routes
route_prefix ANNUAL_LEAVE_ROUTE_PREFIX annual-leave URL prefix for package routes
route_middleware N/A [] Middleware to apply to routes (set in config file)

License

This package is open-sourced software. Please check the repository for license information.

Credits


All versions of annual-leave-widget with dependencies

PHP Build Version
Package Version
Requires php Version ^8.5
illuminate/support Version ^12.0|^13.0
illuminate/routing Version ^12.0|^13.0
illuminate/view Version ^12.0|^13.0
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 fredbradley/annual-leave-widget contains the following files

Loading the files please wait ...