rahul900day / laravel-csv
CSV manipulation for Laravel.
Fund package maintenance!
Ko Fi
Requires
- php: ^8.0
- illuminate/contracts: ^8.0|^9.0
- illuminate/support: ^8.0|^9.0
- league/csv: ^9.0
Requires (Dev)
- mockery/mockery: ^1.5
- orchestra/testbench: ^6.0|^7.0
- pestphp/pest: ^1.22
- pestphp/pest-plugin-laravel: ^1.3
- pestphp/pest-plugin-mock: ^1.0
- phpunit/phpunit: ^9.5
This package is auto-updated.
Last update: 2024-11-11 12:05:55 UTC
README
Laravel CSV is a supercharged ⚡ CSV reader with the sweets of Laravel Eloquent.
NOTE: This is very early stage of this package so do not use this package to production API may have change in the feature.
What needs to be done in this package:
- Add
Where
Clause to theBuilder
- Add
OrderBy
to theBuilder
- Add Sanitization support
- Add support for casting
- Add file saving support
- Add enum support
- Add Facade Support
- Add Tests
Installation
Requires PHP 8.0+
Require Laravel CSV using Composer:
composer require rahul900day/laravel-csv
Usage
use Rahul900day\Csv\Facades\Csv; // Print 3 Passenger Name age above 20 Csv::fromPath('titanic.csv') ->query() ->where('Age', '>', 20) ->willBeSanitized() ->lazy() ->take(3) ->each(function ($passenger) { echo $passenger->Name });
Credits
This package contains code copied from Laravel's Builder
& Collection
class.
License
This package is released under the MIT License.