GithubHelp home page GithubHelp logo

jaymeh / laravel-publishable Goto Github PK

View Code? Open in Web Editor NEW
21.0 1.0 10.0 80 KB

Toggle the published state of your Eloquent models easily

License: MIT License

PHP 100.00%
laravel eloquent trait publishable publishing

laravel-publishable's Issues

Automatically make published_at field fillable from the trait

The trait provided in this module relies heavily on adding a new published_at field to migrations and any model that uses it. Therefore it would make sense in the initialise hook that laravel can use to add the published_at field to a list of fillable properties.

Move away from Orchestral Database

It seems that the Orchestral Database package is no longer maintained, I've had some experience with Orchestral Testbench in the past but not sure what the difference is.

Ideally I would like to find an alternative to this and upgrade the test suite to utilise it.

Allow publishing to no longer fire model events

I've got a project which relies on Events and triggering publish functionality seems to cause an issue with duplicate events firing. For that some new publishQuietly and unpublishQuietly functions would be pretty useful.

Support for Laravel 9

Hi,

I'm interesting in this package to provide functionality for making some models publishable. Just wondering if there are any plans to add Laravel 9 support in a new version? Laravel 9 requires PHP > 8.0 so may hinder any backwards compatability.

Happy to submit a PR with dependency bumps to make this happen but I wanted to check the project scope before putting the work in.

Cheers!

Laravel 10

Laravel 10 is due to be released very soon (potentially next week). This package needs to be updated in order to allow compatibility.

Review whether using mass assignment is a good idea

I've been thinking about a recent change to include published_at as a fillable field but I'm wondering if the best solution for security would be to only update that attribute and recall save functions.

Some things to ponder:

  • Overall security
  • Model events (do they fire?)
  • How do other packages handle this type of functionality?

Change the PR changelog preset

The preset is currently setup to use one that doesn't quite fit our workflow. This will need to be updated to something like the "standard-changelog" preset.

Configurable Field name

This module currently assumes that you will always be using a published_at field on resources.

We should expose some configuration within this module which will allow you to change it to any field.

Adding published_till

Have you thought about adding a published_till variant as well.

You could schedule a model to be visible only during those two dates and after consider it an "archive"?

Add in a new helper function for migrations

When running a migration, rather than specifically adding a field, it might be nice to have a publishable() migration helper function that allows content to apply the field much more easily. This may also make it much better when introducing new potential fields in later migrations if required.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.