laravel package for the Ar-PHP Project

Overview

laravel package for the Ar-PHP Project

this is just a wrapper to use with laravel for the Ar-PHP Library, for more details checkout khaled-alshamaa: ar-php

Installation

You can install the package via composer:

composer require atm-code/ar-php-laravel

Available functions

Spell Numbers in the Arabic Idiom

dump(ArPhpLaravel::int2str(123)); // مئة و ثلاثة و عشرون
dump(ArPhpLaravel::str2int('مئة و ثلاثة و عشرون')); // 123

English-Arabic Transliteration

dump(ArPhpLaravel::en2ar('google')); // غوغل
dump(ArPhpLaravel::ar2en('خالِد الشَمعَة')); // Khalid Ash-Sham'ah

Arabic Gender Guesser

Check the Gender

dump(ArPhpLaravel::isFemale('محمد')); // false

get the gender as string

dump(ArPhpLaravel::guessGender('محمد')); // Male

Parse any Arabic textual datetime description into timestamp

dump(ArPhpLaravel::strtotime('الخميس القادم', time(), 'l dS F Y'))); // Thursday 13th May 2021

Arabic Sentiment Analysis

dump(ArPhpLaravel::arSentiment(TEXT));

Arabic Text Standardize

dump(ArPhpLaravel::standard(TEXT));

Arabic Auto Summarize

dump(ArPhpLaravel::arSummary(TEXT));

Convert Money to string

dump(ArPhpLaravel::money2str(123, 'SAR', 'ar')); // مئة و ثلاثة و عشرون ريالا
dump(ArPhpLaravel::money2str(123, 'SAR', 'en')); // 123 Riyal
dump(ArPhpLaravel::money2str(123, 'EGP', 'ar')); // مئة و ثلاثة و عشرون جنيها

Spell Numbers in the Arabic Idiom

dump(ArPhpLaravel::int2indic(123)); // ١٢٣

Arabic Glyphs to Render Arabic Text

dump(ArPhpLaravel::utf8Glyphs(1229));

Search with Eloquent and query Builder

Using search for arabic letters with Eloquent Builder

Model::searchAr('content','فلسطين')->get();

you can use the same with Query Builder:

DB::table('table_name')->searchAr('content','فلسطين')->get();

you can set the search mode OR (default) or AND

DB::table('table_name')->searchAr('content','فلسطين','OR')->get();

and it will find result for any of the words:

فلسطينيون فلسطيني فلسطينية فلسطينيتين فلسطينيين فلسطينيان فلسطينيات فلسطينيوا

you can also sort the results by using:

DB::table('table_name')->orderAr('content','فلسطين')->get();

Used By

This project is used by the following companies:

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Credits

Todo

  • write more tests
  • add more functions from the main package
  • add helpers for the Facade

License

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

Comments
Releases(1.7.0)
  • 1.7.0(Nov 28, 2022)

    What's Changed

    • Update composer.json by @atmonshi in https://github.com/atm-code/ar-php-laravel/pull/20

    Full Changelog: https://github.com/atm-code/ar-php-laravel/compare/1.6.1...1.7.0

    Source code(tar.gz)
    Source code(zip)
  • 1.6.1(Sep 27, 2022)

    What's Changed

    • Update README.md by @atmonshi in https://github.com/atm-code/ar-php-laravel/pull/12
    • Atmonshi patch 1 by @atmonshi in https://github.com/atm-code/ar-php-laravel/pull/17
    • Reformat Arabic object & add isArabic method by @ayaseensd in https://github.com/atm-code/ar-php-laravel/pull/18
    • Apply fixes from StyleCI by @atmonshi in https://github.com/atm-code/ar-php-laravel/pull/19

    New Contributors

    • @ayaseensd made their first contribution in https://github.com/atm-code/ar-php-laravel/pull/18

    Full Changelog: https://github.com/atm-code/ar-php-laravel/compare/1.6.0...1.6.1

    Source code(tar.gz)
    Source code(zip)
  • 1.6.0(Feb 8, 2022)

  • 1.5.0(Jan 31, 2022)

  • 1.4(Sep 17, 2021)

  • 1.3.1(May 11, 2021)

  • 1.3.0(May 8, 2021)

  • 1.2.0(May 4, 2021)

  • 1.1.0(Apr 6, 2021)

  • 1.0.0(Apr 5, 2021)

Owner
ATM-code
we do coding stuff :)
ATM-code
laravel package for the Ar-PHP Project

laravel package for the Ar-PHP Project this is just a wrapper to use with laravel for the Ar-PHP Library, for more details checkout khaled-alshamaa

ATM-code 20 Dec 21, 2022
The idea of this package is using PHP Attribute in a laravel project

Laravel #[Annotation] Introduction PHP 8.0 release was a revolution for the language. It brings cool features like Named arguments, Attributes, Constr

null 13 Apr 29, 2022
A package to generate modules for a Laravel project.

Laravel Modular A package to generate modules for a Laravel project. Requirements PHP 7.4 or greater Laravel version 8 Installation Install using comp

DPTSI 5 Mar 16, 2022
🏭This package lets you create factory classes for your Laravel project.

Laravel Factories Reloaded ?? This package generates class-based model factories, which you can use instead of the ones provided by Laravel. Laravel 8

Christoph Rumpel 372 Dec 27, 2022
Jetstrap is a lightweight laravel 8 package that focuses on the VIEW side of Jetstream / Breeze package installed in your Laravel application

A Laravel 8 package to easily switch TailwindCSS resources generated by Laravel Jetstream and Breeze to Bootstrap 4.

null 686 Dec 28, 2022
A Laravel chat package. You can use this package to create a chat/messaging Laravel application.

Chat Create a Chat application for your multiple Models Table of Contents Click to expand Introduction Installation Usage Adding the ability to partic

Tinashe Musonza 931 Dec 24, 2022
This package provides extended support for our spatie/enum package in Laravel.

Laravel support for spatie/enum This package provides extended support for our spatie/enum package in Laravel. Installation You can install the packag

Spatie 264 Dec 23, 2022
Testbench Component is the de-facto package that has been designed to help you write tests for your Laravel package

Laravel Testing Helper for Packages Development Testbench Component is the de-facto package that has been designed to help you write tests for your La

Orchestra Platform 1.9k Dec 29, 2022
🥳🔐 This package is a Laravel package that checks if an email address is a spammer

This package is a Laravel package that checks if an email address is a spammer. It verifies your signups and form submissions to confirm that they are legitimate.

Endurance, the Martian 15 Dec 19, 2022
Laravel application project as Sheina Online Store backend to be built with Laravel and VueJS

About Laravel Laravel is a web application framework with expressive, elegant syntax. We believe development must be an enjoyable and creative experie

Boas Aditya Christian 1 Jan 11, 2022
The Laravel Boilerplate Project - https://laravel-boilerplate.com - For Slack access, visit:

Laravel Boilerplate (Current: Laravel 8.*) (Demo) Demo Credentials Admin: [email protected] Password: secret User: [email protected] Password: secret Offici

Anthony Rappa 5.4k Jan 7, 2023
ergodnc (Ergonomic Desk & Coffee) is an open source Laravel project that's being built live on the official Laravel YouTube Channel

About This Project ergodnc (Ergonomic Desk & Coffee) is an open source Laravel project that's being built live on the official Laravel YouTube Channel

Mohamed Said 248 Dec 26, 2022
Packagit is amazing laravel modules management, you could manage huge project with many separate laravel modules.

Packagit is amazing laravel modules management, you could manage huge project with many separate laravel modules.

null 364 Dec 12, 2022
Twitter clone project being developed by using PHP Laravel Framework and tailwind.css

Twits! About Twits! We, as enthusiastic learners and new developers, kicked of this project in order to improve our skills and capabilities in PhP Lar

Furkan Meraloğlu 10 Aug 29, 2022
Ghygen is a GitHub Actions configurator for your PHP / Laravel project.

Ghygen Ghygen is a GitHub actions Yaml Generator. Ghygen allows you creating your Yaml file for GitHub Actions, for Laravel/PHP web application, so yo

Hi Folks! 268 Dec 11, 2022
Effortlessly create a PHP preload script for your Laravel project.

This package has been superseeded by Laragear/Preload. Please migrate to the new package. Laraload Effortlessly create a PHP Preload Script for your L

Italo 209 Dec 7, 2022
Public API for the project coding.events. Made in PHP 8.0 with Lumen 8, PHP-FPM, NGINX and MySQL 8.

coding.events API Uma API feita apenas para passar o tempo, montando uma API para o site <coding.events>. Sinta-se livre para usar esse código como es

Kaique Garcia 3 Oct 9, 2022
PHP components - collection of cross-project PHP classes

PHP components Collection of cross-project PHP classes. Install: $ composer require ansas/php-component Ansas\Component\Convert\ConvertPrice Convert "

null 1 Jan 5, 2022
GeoLocation-Package - This package helps you to know the current language of the user, the country from which he is browsing, the currency of his country, and also whether he is using it vpn

GeoLocation in PHP (API) ?? ?? ?? This package helps you to know a lot of information about the current user by his ip address ?? ?? ?? This package h

Abdullah Karam 4 Dec 8, 2022