All Projects → tighten → Quicksand

tighten / Quicksand

Licence: mit
Easily schedule regular cleanup of old soft-deleted Eloquent data.

Projects that are alternatives of or similar to Quicksand

Corcel
Use WordPress backend with Laravel or any PHP application
Stars: ✭ 3,504 (+1252.9%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Translatable
A Laravel package for multilingual models
Stars: ✭ 624 (+140.93%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Medialibrary
Associate files with Eloquent models
Stars: ✭ 4,743 (+1731.27%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Schedulable
Schedule and unschedule eloquent models elegantly without cron jobs
Stars: ✭ 78 (-69.88%)
Mutual labels:  hacktoberfest, eloquent, laravel
Laravel Mediable
Laravel-Mediable is a package for easily uploading and attaching media files to models with Laravel 5.
Stars: ✭ 541 (+108.88%)
Mutual labels:  hacktoberfest, eloquent, laravel
Generators
Laravel File Generators with config and publishable stubs
Stars: ✭ 102 (-60.62%)
Mutual labels:  hacktoberfest, laravel, pivot-tables
Librenms
Community-based GPL-licensed network monitoring system
Stars: ✭ 2,567 (+891.12%)
Mutual labels:  hacktoberfest, laravel
Laravel Surveillance
Put malicious users, IP addresses and anonymous browser fingerprints under surveillance, log the URLs they visit and block malicious ones from accessing the Laravel app.
Stars: ✭ 198 (-23.55%)
Mutual labels:  hacktoberfest, laravel
Laravelpackage.com
Documentation for LaravelPackage.com: Learn to create Laravel specific PHP packages from scratch, following this open documentation.
Stars: ✭ 214 (-17.37%)
Mutual labels:  hacktoberfest, laravel
Larastan
⚗️ Adds code analysis to Laravel improving developer productivity and code quality.
Stars: ✭ 3,554 (+1272.2%)
Mutual labels:  hacktoberfest, laravel
Nebula
Nebula is a minimalistic and easy to use administration tool for Laravel applications, made with Laravel, Alpine.js, and Tailwind CSS.
Stars: ✭ 190 (-26.64%)
Mutual labels:  hacktoberfest, laravel
Urlhub
URL shortener web application based on the Laravel PHP Framework.
Stars: ✭ 217 (-16.22%)
Mutual labels:  hacktoberfest, laravel
Wagonwheel
Offer an online version of your Laravel emails to users.
Stars: ✭ 224 (-13.51%)
Mutual labels:  hacktoberfest, laravel
Icalendar Generator
Generate calendars in the iCalendar format
Stars: ✭ 193 (-25.48%)
Mutual labels:  hacktoberfest, laravel
Laravel Datatables Buttons
jQuery DataTables Buttons Plugin for Laravel.
Stars: ✭ 192 (-25.87%)
Mutual labels:  hacktoberfest, laravel
Laravel Executor
Configurable code that can be run when installing and updating your web app.
Stars: ✭ 204 (-21.24%)
Mutual labels:  hacktoberfest, laravel
Multi Tenant
Run multiple websites using the same Laravel installation while keeping tenant specific data separated for fully independent multi-domain setups, previously github.com/hyn/multi-tenant
Stars: ✭ 2,304 (+789.58%)
Mutual labels:  hacktoberfest, laravel
Onesignal
OneSignal notifications channel for Laravel
Stars: ✭ 222 (-14.29%)
Mutual labels:  hacktoberfest, laravel
Gistlog
GistLog - simple, easy blogging based on GitHub gists
Stars: ✭ 237 (-8.49%)
Mutual labels:  hacktoberfest, laravel
Laravel Query Monitor
Simple artisan command to monitoring triggered queries
Stars: ✭ 230 (-11.2%)
Mutual labels:  hacktoberfest, laravel

Quicksand logo

Quicksand

Tests

Schedule a force delete of your soft deleted Eloquent models or pivot tables after they've been soft deleted for a given period of time.

Quicksand is an Artisan command that you can run in your scheduler daily.

Requirements

  • If you are using Laravel 5.6 or higher, use version 2.0 of this package.
  • If you are using Laravel 5.5 and running PHP 7.1 or higher, use version 1.0 of this package.
  • If you are using Laravel 5.4 or lower, or PHP 7.0 or lower, please use version 0.2 of this package.

Installation

  1. Add Quicksand to your Composer file: composer require tightenco/quicksand

  2. Register the Quicksand Service provider in config/app.php (you can skip this step if you're using Laravel 5.5 or higher due to package auto-discovery):

    'providers' => [
        ...
    
        Tightenco\Quicksand\QuicksandServiceProvider::class,
    
  3. Publish your config: php artisan vendor:publish --provider="Tightenco\Quicksand\QuicksandServiceProvider"

  4. Edit your config. Define which classes and/or pivot tables you'd like to have Quicksand clean up for you, how many days Quicksand should wait to clean up, and whether or not the results should be logged. The default 'days' until cleaning up is overridable by specifying a 'days' key when registering a model or pivot table:

    1. Note: Quicksand will disregard any global scopes applied to models when deleting.
    2. Note: Prior to version 2.3 the deletables configuration key was named models and did not support pivot tables.
    'days' => 30,
    
    'deletables' => [
        App\Default::class,
        App\CleanEveryTwentyDays::class => [
            'days'  => 20 // override default 'days'
        ],
        'example_pivot',
        'example_pivot' => [
            'days'  => 20 // override default 'days'
        ]
    ]
    
  5. Schedule the command in app/Console/Kernel.php:

    protected function schedule(Schedule $schedule)
    {
        $schedule->command('quicksand:run')
            ->daily();
    }
    

Using a Custom Log File

If you are using Laravel 5.6 or higher, you can customize the logger Quicksand uses by adding a quicksand channel to your logging.php config file like so:

'channels' => [
    /* ... */
    'quicksand' => [
        'driver' => 'single',
        'path' => storage_path('logs/quicksand.log'),
        'level' => 'info',
    ],
]

If you are using Laravel 5.5 or lower, you can customize the logger Quicksand uses by editing the custom_log_file option in your quicksand.php config file.

By default, Quicksand will log to the standard laravel.log file.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

This package is developed and maintained by Tighten.

Testing

You can test this package by running

composer test

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].