Search by

i3bepb / laravel-crop-str-blade-directive

i3bepb

This package is abandoned and no longer maintained. No replacement package was suggested.

Crop str blade directive

Package info

github.com/i3bepb/laravel-crop-str-blade-directive

pkg:composer/i3bepb/laravel-crop-str-blade-directive

Statistics

Installs: 15

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.1 2023-03-02 06:47 UTC

This package is auto-updated.

Last update: 2026-10-02 10:36:34 UTC


README

Crop str blade directive

This project is no longer maintained. No further updates, bug fixes, or support for newer PHP or Laravel versions are planned.

Install

composer require i3bepb/laravel-crop-str-blade-directive

Final compatibility

Package Version Laravel Version PHP Versions
1 8 7.4, 8.0, 8.1
1 9 8.0, 8.1

PHP 8.2+, Laravel 7 and earlier, and Laravel 10+ are outside this compatibility range.

How use

With variable

For example, there is a $formatted variable with a text of more than 100 bytes, you can crop it using the directive

<div>As you can see @crop($formatted, 90)</div>

With string

Or an example with string

<div>@crop('Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor. Aenean massa. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Nulla consequat massa quis enim. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu', 90)</div>

Result

<div>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aenean commodo ligula eget dolor...</div>