Add internal link to your published assets.

Overview

Quality Score Total Downloads

WORK IN PROGRESS, some functionalities may be changed in the future.

Add internal link to your published assets.

Installation

You can install the package via composer:

composer require kaqazstudio/laravel-interlink

Manual Registration

If autodiscovery doesn't work, register the package in your project manually.

■ Add this line to config/app.php > providers array

KaqazStudio\LaravelInterlink\ServiceProvider\LaravelInterlinkServiceProvider::class

■ Then add the line below to config/app.php > aliases array

'LaravelInterlink' => KaqazStudio\LaravelInterlink\Facade\LaravelInterlinkFacade::class

Use with Facade

Initialize Interlink

LaravelInterlink::single();

Use without Facade

Initialize Interlink without facade

LaravelInterlink::access();

Laravel Interlink are available on chains! :)

Methods

Method Required Type Default Description
init true chain Fire the engine
setKeyword true string null Set target keyword
setTitle false string keyword Replace with the keyword
setLink true string null Set internal link url
rawLink false bool false Set link url to raw format
setCount false int infinite Count of link replacement
setPosts true array null Set posts collection
column true string null Set content column
markdown false bool false MarkDown format for links
blank false bool false Set links target to _blank
noFollow false bool false Set links rel to nofollow
setCustomAttributes false string null Set custom html attributes for a tag
process true chain Process link internalization
getUpdatedPosts false chain Get updated posts as a collection
updatePosts false chain Do update method on all posts

Example

For example, you want to refer all first AirPods words to /apple-airpods in all of your published Blog posts.

LaravelInterlink::single()
                ->init()                     // Warm engine
                ->setKeyword('AirPods')      // Target Keyword
                ->setLink('/apple-airpods')  // Target url
                ->setCount(1)                // For first word
                ->setPosts(BlogPost::all())  // Get all blog posts
                ->setColumn('body')          // Set `body` column for content target
                ->process()                  // Process internalization
                ->updatePosts();             // Run update on posts!

Also, you can get all updated contents as a collection!

So, you MOST use getUpdatedPosts() INSTEAD OF updatePosts()

Use customized links

When you need to use your own format for link you can easily do like this

LaravelInterlink::single()
                ...
                ->setLink('<a href="own.com">Custom-Link</a>')  // Your custom format
                ->rawLink()                                     // Raw link format [+]
                ...

Or, Maybe you to add custom html attributes to default link format - "Default a tag"

LaravelInterlink::single()
                ...
                ->setCustomAttributes('custom-data="Hello"')  // Raw link format [+]
                ...

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

You might also like...
Laravel Breadcrumbs - An easy way to add breadcrumbs to your @Laravel app.

Introduction Breadcrumbs display a list of links indicating the position of the current page in the whole site hierarchy. For example, breadcrumbs lik

This package helps you to add user based follow system to your model.

Laravel Follow User follow unfollow system for Laravel. Related projects: Like: overtrue/laravel-like Favorite: overtrue/laravel-favorite Subscribe: o

An easy way to add colors in your CLI scripts.
An easy way to add colors in your CLI scripts.

COLORS Here is a preview of what you can achieve with the library: Installation Installation via composer is highly recommended. { "require": {

Custom Blade components to add sortable/drag-and-drop HTML elements in your apps.
Custom Blade components to add sortable/drag-and-drop HTML elements in your apps.

Laravel Blade Sortable Demo Repo Installation You can install the package via composer: composer require asantibanez/laravel-blade-sortable After the

Easily add a full Laravel blog (with built in admin panel and public views) to your laravel project with this simple package.

Webdevetc BlogEtc - Complete Laravel Blog Package Quickly add a blog with admin panel to your existing Laravel project. It has everything included (ro

Laravel-tagmanager - An easier way to add Google Tag Manager to your Laravel application.

Laravel TagManager An easier way to add Google Tag Manager to your Laravel application. Including recommended GTM events support. Requirements Laravel

Add a general-purpose tools page to your Filament project. 🛠
Add a general-purpose tools page to your Filament project. 🛠

Add a general-purpose tools page to your Filament project. Installation You can install the package via Composer: composer require ryangjchandler/fila

Add Active Campaign API v3 to your Laravel application.

Laravel ActiveCampaign (WIP) This package provides a simple interface to the ActiveCampaign API v3. Currently the packages only supports the endpoints

Add a progress bar column to your Filament tables.
Add a progress bar column to your Filament tables.

Add a progress bar column to your Filament tables. This package provides a ProgessColumn that can be used to display a progress bar in a Filament tabl

Releases(v0.1.0)
Owner
Kaqaz Studio
Kaqaz is a little software team with 5-10 members🎗
Kaqaz Studio
Laravel-Mix helper for projects with complex & multi assets.

Laravel-Mix helper for projects with complex & multi assets. ?? Getting started Since mix introduced in laravel 5.4 it is recommended to use this pack

Fandogh 27 Oct 4, 2022
Flow package to synchronize metadata and binary data of imported Neos.Media assets

Wwwision.AssetSync Flow package to synchronize metadata and resources of imported Neos.Media assets Installation Install this package via: composer re

Bastian Waidelich 5 Feb 7, 2022
This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets.

Laravel Nova Search This package provides a console command to convert dynamic JS/CSS to static JS/CSS assets. Requirements laravel-mix v6.0+ php 7.3+

Akki Khare 3 Jul 19, 2022
Allows Filament static assets (css, js) to be served directly from /public

Filament Static Asset Handling This package aims to solve improve the static asset handling of the amazing Laravel package Filament. By default Filame

Jamie Holly 8 Dec 6, 2022
Add tags and taggable behaviour to your Laravel app

Add tags and taggable behaviour to a Laravel app This package offers taggable behaviour for your models. After the package is installed the only thing

Spatie 1.4k Dec 29, 2022
This package lets you add uuid as primary key in your laravel applications

laravel-model-uuid A Laravel package to add uuid to models Table of contents Installation Configuration Model Uuid Publishing files / configurations I

salman zafar 10 May 17, 2022
A Laravel package helps you add a complete real-time messaging system to your new / existing application with only one command.

A Laravel package helps you add a complete real-time messaging system to your new / existing application with only one command.

Munaf Aqeel Mahdi 1.7k Jan 5, 2023
Add Server-Timing header information from within your Laravel apps.

Laravel Server Timings Add Server-Timing header information from within your Laravel apps. Installation You can install the package via composer: comp

Beyond Code 498 Dec 15, 2022
`dd` is a helper method in Laravel. This package will add the `dd` to your application.

dd dd is a helper method in Laravel. This package will add the dd to your application. Install Run composer require larapack/dd 1.* For Laravel Larave

Larapack 109 Dec 26, 2022
Add Webhooks to your Laravel app, arrr

# Captain Hook ## Add Webhooks to your Laravel app, arrr Implement multiple webhooks into your Laravel app using the Laravel Event system. A webhook i

Marcel Pociot 334 Dec 12, 2022