PHPackages                             lightit/laravel-google-jobs - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. lightit/laravel-google-jobs

ActiveLibrary

lightit/laravel-google-jobs
===========================

Google Job Posting integration for Laravel

111.2k↓100%4[2 issues](https://github.com/Light-it-labs/laravel-google-jobs/issues)PHP

Since Oct 27Pushed 2y ago4 watchersCompare

[ Source](https://github.com/Light-it-labs/laravel-google-jobs)[ Packagist](https://packagist.org/packages/lightit/laravel-google-jobs)[ RSS](/packages/lightit-laravel-google-jobs/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Google Job Posting Metadata Generator
=============================================

[](#laravel-google-job-posting-metadata-generator)

[![Build Status](https://camo.githubusercontent.com/af0a28d83ee66973ef6a2997bf81057a4951a9c1218c83a0c9f6bc98cdbc86a8/68747470733a2f2f7472617669732d63692e636f6d2f4c696768742d69742d6c6162732f6c61726176656c2d676f6f676c652d6a6f62732e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/Light-it-labs/laravel-google-jobs)

This package allows you to generate the required metadata for Google Jobs Announcements in a easy and Laravel way.

Installation
------------

[](#installation)

You can install this package via composer `composer require lightit/laravel-google-jobs`

The service provider will be auto discovered and then automatically added to your providers array.

Usage
-----

[](#usage)

Laravel Google Jobs provides two different ways of json generation:

1. You can use the `GJob` facade available at: `Lightit\LaravelGoogleJobs\Facades` namespace
2. You can use Laravel's dependency injection system. From your class constructor, inject the `GJobContract`. This will return a singleton instance of `Lightit\LaravelGoogleJobs\GJob` class.

```
use Lightit\LaravelGoogleJobs\Contracts\GJobContract;

class JobOfferController extends Controller
{
    /* @var GjobContract */
    private $gjob;

    public function __construct(GJobContract $gjob)
    {
        // $this->gjob is now a GJob class singleton instance
        $this->gjob = $gjob;
    }

}
```

Available API
-------------

[](#available-api)

Google Job Posting allows a specific set of fields for your jobs. Check:  for more information.

Some of these fields are required, and others are optional. This package will help you through the process of generating and validating all this data properly, so you don't have to care about the formatting or the definitions of the JSON.

#### Methods

[](#methods)

`$this->gjob->fields(array $parameters): GJob`

This method adds all `array $parameters` into your current instance and performs data validations. If one of the required parameters is missing from the array a`Lightit\LaravelGoogleJobs\Exceptions\FieldsValidationsException` will be thrown specifying the missing required fields.

---

`$this->gjob->withOptionals(array $parameters): GJob`

As the name says, this method adds all `array $parameters` into your current instance, performing data validations. Only format validations are performed over these fields.

---

`$this->gjob->generate(): string`

Generates the proper JSON format and validates all the instance parameters.

Example
-------

[](#example)

```
public function show(Request $request, $id)
{
    // Lets say we want to allow google to render our job offer

    // Cool! Is time to do some magic with this package, we are going to use the Facade for this example
     // All You have to do is create an array like this one.
      // We strongly recomend the use of a model accessor in order to avoid duplicated code and provide one single source of truth for your job offer array representation
    $jobArray = [
        'datePosted' => '...',
        'text' => '...',
        'hiringOrganization' => [
            '@type' => '...',
            'name' => '...',
            'sameAs' => '...',
            'logo' => '...'
        ],
        'jobLocation' => [
            '@type' => '...',
            'streetAddress'=> '...',
            'addressLocality'=> '...',
            'addressRegion'=> '...',
            'postalCode'=> '...',
            'addressCountry'=> '...'
        ],
        'title' => '...',
        'validThrough' => '...'
    ];

    // Add your array into the singleton instance
    GJob::fields($jobArray);

    return view('details');
}
```

Now, all you have to do is call to the `generate()` method directly on your view before you close the `` tag

```
.
.
.
.

I'm the best job offer ever!

    {!! GJob::generate() !!}

```

And voila! A beautiful and fully compatible JSON is rendered for you.

About Lightit
-------------

[](#about-lightit)

[Light-it](https://lightit.io) is a digital product development studio with offices in the US, Uruguay and Paraguay.

[![](https://avatars1.githubusercontent.com/u/39625568?s=200&v=4)](https://avatars1.githubusercontent.com/u/39625568?s=200&v=4)

License
-------

[](#license)

This project and the Laravel framework are open-sourced software licensed under the [MIT license](http://opensource.org/licenses/MIT).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance16

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity20

Early-stage or recently created project

 Bus Factor1

Top contributor holds 53.8% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/538e0eddceaf8ef997aa64ff8e0147085f12c23eced919b2291339a693f62814?d=identicon)[alanbrande](/maintainers/alanbrande)

![](https://www.gravatar.com/avatar/531ea88afdb7de381d7f8ddc65dfab3c2c2cb46d1cb8cc791439636674ab98a0?d=identicon)[creysayagolightit](/maintainers/creysayagolightit)

---

Top Contributors

[![alanbrande](https://avatars.githubusercontent.com/u/16725715?v=4)](https://github.com/alanbrande "alanbrande (7 commits)")[![glcordon](https://avatars.githubusercontent.com/u/4430871?v=4)](https://github.com/glcordon "glcordon (2 commits)")[![Alt-W](https://avatars.githubusercontent.com/u/17958183?v=4)](https://github.com/Alt-W "Alt-W (1 commits)")[![jp-light-it](https://avatars.githubusercontent.com/u/84866442?v=4)](https://github.com/jp-light-it "jp-light-it (1 commits)")[![JuanNitram](https://avatars.githubusercontent.com/u/37601041?v=4)](https://github.com/JuanNitram "JuanNitram (1 commits)")[![sojeda](https://avatars.githubusercontent.com/u/17851841?v=4)](https://github.com/sojeda "sojeda (1 commits)")

---

Tags

google-apigoogle-job-discoverygoogle-job-postinggoogle-jobsjsonlaravellaravel6laravel7seoseo-optimization

### Embed Badge

![Health badge](/badges/lightit-laravel-google-jobs/health.svg)

```
[![Health](https://phpackages.com/badges/lightit-laravel-google-jobs/health.svg)](https://phpackages.com/packages/lightit-laravel-google-jobs)
```

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
