An ultra-fast Laravel docs search workflow for Alfred 3+.

Overview

Laravel Docs Workflow for Alfred

An ultra-fast Laravel docs search workflow for Alfred 3+.

Screenshot

Installation

  1. Download the latest version
  2. Install the workflow by double-clicking the .alfredworkflow file
  3. You can add the workflow to a category, then click "Import" to finish importing. You'll now see the workflow listed in the left sidebar of your Workflows preferences pane.

Usage

Just type ld followed by your search query.

ld <query>
ld preview mailables

Either press ⌘Y to Quick Look the result, or press <enter> to open it in your web browser.

Changing Branches

By default this workflow searches the master branch of the docs. However, you can change that to any branch listed on laravel.com/docs.

  1. Go to the Laravel Docs workflow in your Alfred preferences
  2. Click the [𝝌] icon
  3. Set the value of branch variable to your desired version (e.g. 8.x)
Comments
  • Alfred 3.x compatibility issue

    Alfred 3.x compatibility issue

    Not sure if this is a regression bug, or you removed the support for Alfred 3 and just forgot to update the readme files, but I was unable to install the version from the current master branch. Alfred 3.8.6 complains that the workflow isn't compatible.

    I've next tried installing the previous version with the tag v0.2.4 and it worked just fine with my Alfred 3.

    opened by ivanhoe011 14
  • Alfred 4 on Mac Monterey on M1 MacBook Pro

    Alfred 4 on Mac Monterey on M1 MacBook Pro

    Is anyone having issues with the the workflow? Just setting up a new M1Max MacBook Pro with Alfred 4 and this workflow exhibits an odd behavior. When you 'wake Alfred' and type "ld" you see what you'd expect in the Alfred query box Screen Shot 2021-10-30 at 6 37 32 PM

    But just as soon as you start typing the query, Alfred thinks you're typing in a regular search query? see this screen:

    Screen Shot 2021-10-30 at 6 37 48 PM

    I'm not 100% the best way to describe this issue so any suggestions would be appreciated.

    So this is Monterey 12.0.1 on a MacBook Pro with the M1Max chip. Not sure any of that makes a difference. I have several workflows that exhibit similar behavior. I've confirmed that the php executable is correct. This is what the configuration screen looks like:

    Screen Shot 2021-10-30 at 6 47 52 PM
    opened by AstroBoy269 9
  • Laravel 8 support

    Laravel 8 support

    Hi, I don't know if its only me, but I changed the branch to 8.x and the results is always empty.

    Am I doing it right?

    BTW, thanks for this, it's an awesome tool.

    opened by beebmx 7
  • Help fot Ulauncher configuration

    Help fot Ulauncher configuration

    Hi @tillkruss . Times ago I have a Mac with Alfredapp. Now I'm using a PC with Linux and I'm using Ulauncher.

    I find a way to have the search work for Pest and Livewire but I cannot "convert" your to work.

    I'm using this data:

    ...
        "laravel": {
            "name": "Laravel",
            "description": "The PHP Framework for Web Artisans",
            "icon": "images/docs/laravel.jpg",
            "algolia_index": "docs",
            "algolia_application_id": "8BB87I11DE",
            "algolia_api_key": "8e1d446d61fce359f69cd7c8b86a50de",
            "url": "https://laravel.com/docs/7.x/"
        },
        "livewire": {
            "name": "Livewire",
            "description": "Livewire is a full-stack framework that makes building dynamic interfaces simple, without leaving the comfort of Laravel.",
            "icon": "images/docs/livewire.jpg",
            "algolia_index": "livewire-framework",
            "algolia_application_id": "BH4D9OD16A",
            "algolia_api_key": "cec0554d960fa30b4b0b610f372a8636",
            "url": "https://laravel-livewire.com/docs/quickstart/"
        },
    ...
    

    Can you give me some hints?

    opened by max-bertinetti 7
  • Can not query 9.x docs, but can query 8.x docs.`

    Can not query 9.x docs, but can query 8.x docs.`

    I am not able to use the workflow to search for version 9 docs, only 8.

    When the branch variable is set to 8.x and I type ld eloquent, I get the following:

    [13:37:11.424] Laravel Docs[Script Filter] Queuing argument 'eloquent'
    [13:37:11.692] Laravel Docs[Script Filter] Script with argv '(null)' finished
    [13:37:11.696] Laravel Docs[Script Filter] {"items":[{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent-resources#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent-resources#introduction","subtitle":"API Resources \u00bb Introduction","title":"Eloquent ORM","uid":"b3e9d38184ace20cc6f74af7076aebc6f0d27332","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent-mutators#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent-mutators#introduction","subtitle":"Mutators \/ Casts \u00bb Introduction","title":"Eloquent ORM","uid":"a797ac40d92b7edda00241f5b05d535bff2f6e50","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent-collections#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent-collections#introduction","subtitle":"Collections \u00bb Introduction","title":"Eloquent ORM","uid":"6e0c70409df829a54917886167a8068a5bf4a51c","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent-serialization#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent-serialization#introduction","subtitle":"Serialization \u00bb Introduction","title":"Eloquent ORM","uid":"5f607bffe17ceb3bc9fd954b19f73339b05ae2b2","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent#introduction","subtitle":"Getting Started \u00bb Introduction","title":"Eloquent ORM","uid":"3d99c67844fe08f31df3bfa18fa10f04eac92fca","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/eloquent-relationships#introduction","autocomplete":"Eloquent ORM","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/eloquent-relationships#introduction","subtitle":"Relationships \u00bb Introduction","title":"Eloquent ORM","uid":"2dd57d4f23ecf9dfb11bf989a318a3cf42ad897d","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/upgrade#eloquent","autocomplete":"Prologue","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/upgrade#eloquent","subtitle":"Upgrade Guide \u00bb Upgrading To 8.0 From 7.x","title":"Prologue","uid":"c7859e3fe93aeeb67dde728f7078fe2127bf9374","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/pagination#paginating-eloquent-results","autocomplete":"Database","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/pagination#paginating-eloquent-results","subtitle":"Pagination \u00bb Basic Usage","title":"Database","uid":"3c4c041845026ff6e6da6139e275ba073b69c5e0","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/responses#eloquent-models-and-collections","autocomplete":"The Basics","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/responses#eloquent-models-and-collections","subtitle":"Responses \u00bb Creating Responses","title":"The Basics","uid":"cf80dc3dcb82ec79b8a63cfd1fd8a4e0b2e839b5","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/urls#eloquent-models","autocomplete":"The Basics","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/urls#eloquent-models","subtitle":"URL Generation \u00bb URLs For Named Routes","title":"The Basics","uid":"fa2446a38227d0e5085e059791482a12dff3210f","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/releases#model-factory-classes","autocomplete":"Prologue \u00bb Model Factory Classes","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/releases#model-factory-classes","subtitle":"Eloquent model factories have been entirely re-written as class based factories and improved to have first-class relationship support. For example, the UserFactory included with Laravel is written like so","title":"Prologue \u00bb Model Factory Classes","uid":"d0d1c69a8c29244b2bd027759f1b9f95ee3b7616","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/scout#configuring-model-indexes","autocomplete":"Packages \u00bb Configuring Model Indexes","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/scout#configuring-model-indexes","subtitle":"Each Eloquent model is synced with a given search \"index\", which contains all of the searchable records for that model. In other words, you can think of each index like a MySQL table. By default, each model will be persisted to an index matching the model's typical \"table\" name. Typically, this is the plural form of the model name; however, you are free to customize the model's index by overriding the searchableAs method on the model","title":"Packages \u00bb Configuring Model Indexes","uid":"8caa5d16c8f9bc181c6aa7acf7c655dbe71048b6","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/collections#creating-collections","autocomplete":"Digging Deeper \u00bb Creating Collections","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/collections#creating-collections","subtitle":"The results of Eloquent queries are always returned as Collection instances","title":"Digging Deeper \u00bb Creating Collections","uid":"600a816a73b1cdbb929434885ed9344c378a2f5c","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/routing#implicit-binding","autocomplete":"The Basics \u00bb Implicit Binding","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/routing#implicit-binding","subtitle":"Laravel automatically resolves Eloquent models defined in routes or controller actions whose type-hinted variable names match a route segment name. For example","title":"The Basics \u00bb Implicit Binding","uid":"aecae42de9def94d2caed3f66db70edd39b73291","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/queues#ignoring-missing-models","autocomplete":"Digging Deeper \u00bb Ignoring Missing Models","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/queues#ignoring-missing-models","subtitle":"When injecting an Eloquent model into a job, the model is automatically serialized before being placed on the queue and re-retrieved from the database when the job is processed. However, if the model has been deleted while the job was waiting to be processed by a worker, your job may fail with a ModelNotFoundException ","title":"Digging Deeper \u00bb Ignoring Missing Models","uid":"dc5fe2d792dd3449227273b171a5c3d2191eeb9b","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/broadcasting#model-broadcasting","autocomplete":"Digging Deeper \u00bb Model Broadcasting","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/broadcasting#model-broadcasting","subtitle":"To get started, your Eloquent model should use the Illuminate\\Database\\Eloquent\\BroadcastsEvents trait. In addition, the model should define a broadcastsOn method, which will return an array of channels that the model's events should broadcast on","title":"Digging Deeper \u00bb Model Broadcasting","uid":"6e81dda7fbe04deb469b33a5d0e9567d89f0100a","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/database-testing#concept-overview","autocomplete":"Testing \u00bb Concept Overview","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/database-testing#concept-overview","subtitle":"First, let's talk about Eloquent model factories. When testing, you may need to insert a few records into your database before executing your test. Instead of manually specifying the value of each column when you create this test data, Laravel allows you to define a set of default attributes for each of your Eloquent models using model factories","title":"Testing \u00bb Concept Overview","uid":"0e5caba46543758819a26b84a31e0ed2e6954291","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/controllers#resource-controllers","autocomplete":"The Basics \u00bb Resource Controllers","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/controllers#resource-controllers","subtitle":"If you think of each Eloquent model in your application as a \"resource\", it is typical to perform the same sets of actions against each resource in your application. For example, imagine your application contains a Photo model and a Movie model. It is likely that users can create, read, update, or delete these resources","title":"The Basics \u00bb Resource Controllers","uid":"649fe11f14f7cd208a854841719efe9e0571179b","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/structure#the-models-directory","autocomplete":"Getting Started \u00bb The App Directory","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/structure#the-models-directory","subtitle":"The Models directory contains all of your Eloquent model classes . The Eloquent ORM included with Laravel provides a beautiful, simple ActiveRecord implementation for working with your database. Each database table has a corresponding \"Model\" which is used to interact with that table. Models allow you to query for data in your tables, as well as insert new records into the table","title":"Getting Started \u00bb The App Directory","uid":"0fc233249e2458840b660f9b994ee7671c955bee","valid":true},{"arg":"https:\/\/laravel.com\/docs\/8.x\/authentication#introduction-database-considerations","autocomplete":"Security \u00bb Database Considerations","quicklookurl":"https:\/\/laravel.com\/docs\/8.x\/authentication#introduction-database-considerations","subtitle":"By default, Laravel includes an App\\Models\\User Eloquent model in your app\/Models directory. This model may be used with the default Eloquent authentication driver. If your application is not using Eloquent, you may use the database authentication provider which uses the Laravel query builder","title":"Security \u00bb Database Considerations","uid":"5e393d5446c4bb89a7dfad8ea032bf67caaf2d84","valid":true}]}
    

    When the branch variable is set to 9.x and I type ld eloquent, I get the following:

    [13:37:50.484] Laravel Docs[Script Filter] Queuing argument 'eloquent'
    [13:37:50.795] Laravel Docs[Script Filter] Script with argv '(null)' finished
    [13:37:50.798] Laravel Docs[Script Filter] {"items":[{"arg":"https:\/\/www.google.com\/search?q=laravel%20eloquent","icon":{"path":"google.png"},"quicklookurl":"https:\/\/www.google.com\/search?q=laravel%20eloquent","subtitle":"No match found. Search Google for: \"eloquent\"","title":"Search Google","valid":true},{"arg":"https:\/\/laravel.com\/docs\/","icon":{"path":"icon.png"},"quicklookurl":"https:\/\/laravel.com\/docs\/","subtitle":"No match found. Open laravel.com\/docs...","title":"Open Docs","valid":true}]}
    
    opened by RalphMRivera 6
  • Fix bug in Alfred 4 using getenv()

    Fix bug in Alfred 4 using getenv()

    After doing a fresh install of Alfred 4 then downloading this workflow today it wasn't working correctly - the ld keyword was fine but any query would cause Alfred to default to performing a web search.

    After using the debugging tool in Alfred I could see the following:

    PHP Notice: Undefined index: branch in [...]/laravel.php on line 18

    I also noticed the URL for the Laravel documentation was missing the branch variable in the JSON response.

    After a quick search I came across this and this in the Alfred forums, stating in PHP we should use getenv() over $_ENV. After updating the code I found it is working perfectly in Alfred 4.

    opened by jamesbellnet 4
  • Available as NPM Package

    Available as NPM Package

    First thanks for the great workflow!

    It would be a nice addition if I could install this package via NPM like this workflow here https://github.com/nikersify/alfred-polyglot.

    This way I could it install with my Dotfiles automatically :-)

    Greets

    opened by christophrumpel 4
  • Is there a trick to getting Quick Look to work?

    Is there a trick to getting Quick Look to work?

    Thanks for the great Alfred Workflow!

    When I click [shift] or command Y I don't get a preview of the webpage. I just see the Chrome icon.

    Any ideas how to get a preview?

    Thanks!

    screen shot 2018-08-05 at 8 56 08 am
    opened by EricBusch 4
  • Add Laravel version switch parameter

    Add Laravel version switch parameter

    I've already used this so many times in the last few days, thanks for publishing it.

    Overview

    This PR adds an optional version switch in the command. If not included, the branch will fall back to the $_ENV value (defaults to master as before). This is a stripped down version of PR #3 since you're a rockstar who had already done half of the stuff 🥇

    Example to search docs for Laravel 5.1:

    monosnap 2018-07-31 10-09-12
    opened by jakebathman 4
  • Script Filter Input Error

    Script Filter Input Error

    Debug info:

    Code 255: Parse error: parse error in /Users/user/Library/Application Support/Alfred 3/Alfred.alfredpreferences/workflows/user.workflow.AB3035A2-E6EA-450C-A490-9BE82E820AD0/laravel.php on line 11
    [2018-07-31 11:36:45][ERROR: input.scriptfilter] JSON error: JSON text did not start with array or object and option to allow fragments not set. in JSON:
    

    Local PHP version is 7.2.6

    opened by syropian 2
  • Add Laravel version selector and format results

    Add Laravel version selector and format results

    Thanks a ton for this workflow!

    Overview

    This PR adds a few things:

    • An optional Laravel version at the beginning of the input (e.g. ld 5.1 helpers str) that replaces branch
    • Formatting the results to only return unique URL results and show all available subheadings (h2,h3,h4)

    The formatting won't fix #2 for minimal themes, but you might just permanently move h2 to the title and leave h3 and h4 for the subtitle.

    Screenshots

    Subtitles for context
    monosnap 2018-07-31 09-58-33
    Laravel version
    monosnap 2018-07-31 09-38-27
    opened by jakebathman 1
Releases(v0.3.3)
Owner
Till Krüss
Developer. Tree Hugger. Powerlifter. Dancer.
Till Krüss
This Repository contains a custom Workflow for Alfred which provides the function to instantly search in the Magento 2 DevDocs

Introduction Add the custom search to your Alfred Workflow and have a quicker access to the Magento 2 DevDocs. Installation Just download the alfredwo

David Lambauer 10 Jun 29, 2022
Alfred workflow to convert a Discord snowflake to time

Snowcord for Alfred Takes a Discord snowflake and converts it to a time (UTC, local and Unix timestamp). Also connects with Alfred-Whencord Download D

null 2 Jan 6, 2022
An Alfred 4 workflow for quickly opening directories in Visual Studio Code

Alfred Workflow - Open in Visual Studio Code An Alfred 4 workflow opening files or folders with Visual Studio Code. Note: Alfred Powerpack is required

Daan Hage 2 Jun 27, 2022
An autoscaling Bloom filter with ultra-low memory footprint for PHP

Ok Bloomer An autoscaling Bloom filter with ultra-low memory footprint for PHP. Ok Bloomer employs a novel layered filtering strategy that allows it t

Andrew DalPino 2 Sep 20, 2022
A tool for diff'ing this and OpenTHC lab metrics, creating their objects, and docs.

wcia-analytes-tool Consumes OpenTHC Lab Metrics and WCIA Analytes, and produces diff objects and docs for use in WA State interop. version 0.9.8 Getti

Confidence Analytics 1 Jan 15, 2022
Drupal / Eleventy Docs Site for the Design System

Drupal / Eleventy Docs Site for the Design System

University of Michigan Library 2 Oct 31, 2022
search non profitable charity or organization through api search

Non Profile Charity Search Search non profitable organization or get the details of an organization Installation Require the package using composer: c

Touhidur Rahman 5 Jan 20, 2022
Nova Search is an open source search engine developed by the Artado Project.

Loli Search Loli Search açık kaynak kodlu bir arama motorudur ve yalnızca kendi sonuçlarını değil, diğer arama motorlarının sonuçlarını da göstermekte

Artado Project 10 Jul 22, 2022
Doogle is a search engine and web crawler which can search indexed websites and images

Doogle Doogle is a search engine and web crawler which can search indexed websites and images, and then use keywords to be searched later. Written pri

Zepher Ashe 9 Jan 1, 2023
The Workflow Package add Drag & Drop Workflows to your Laravel Application.

Workflows add Drag & Drop automation's to your Laravel application. The Workflow Package adds Drag & Drop Workflows to your Laravel Application. A Wor

42coders 196 Dec 29, 2022
This package is aimed to be a simplistic PHP workflow package that works in a similar fashion to GitHub Actions.

Workflow This package is aimed to be a simplistic PHP workflow package that works in a similar fashion to GitHub Actions. Installation To install this

Steve McDougall 4 Sep 26, 2022
ApiFlow is an open-source workflow engine

About apiFlow This project is built using Laravel 5.8 apiFlow is an open-source workflow engine designed to ease the implementation of business requir

Mohsen Malayeri 2 Aug 31, 2022
Simple JQL builder for Jira search

Jql Builder Simple JQL builder for Jira search Installation composer require devmoath/jql-builder Usage Generate query with one condition: \DevMoath\J

Moath 11 Jan 2, 2023
Production-grade rapid controller development with built in love for API and Search

Installation For CakePHP 4.x compatible version: composer require friendsofcake/crud For CakePHP 3.x compatible version: composer require friendsofca

Friends Of Cake 357 Jan 2, 2023
Google Search Results PHP API via Serp Api

Google Search Results in PHP This Php API is meant to scrape and parse Google, Bing or Baidu results using SerpApi. The full documentation is availabl

SerpApi 42 Nov 14, 2022
Analyzer of PHP code to search issues with deprecated functionality in newer interpreter versions.

PhpDeprecationDetector PhpDeprecationDetector - analyzer of PHP code to search usages of deprecated functionality in newer interpreter versions - depr

Sergey 312 Dec 26, 2022
Silverstripe-fulltextsearch - Adds external full text search engine support to SilverStripe

FullTextSearch module Adds support for fulltext search engines like Sphinx and Solr to SilverStripe CMS. Compatible with PHP 7.2 Important notes when

Silverstripe CMS 42 Dec 30, 2022
Searchable DataObjects is a module that permit to include DataObjects into frontend search

Searchable DataObjects Searchable DataObjects is a module that permit to include DataObjects into frontend search. Introduction Pages are not always t

Gabriele Brosulo 25 May 11, 2022
Silverstripe-searchable - Adds to the default Silverstripe search by adding a custom results controller and allowing properly adding custom data objects and custom fields for searching

SilverStripe Searchable Module UPDATE - Full Text Search This module now uses Full Text Support for MySQL/MariaDB databases in version 3.* Adds more c

ilateral 13 Apr 14, 2022