francescomalatesta / laravel-feature Goto Github PK
View Code? Open in Web Editor NEWA package to manage feature flagging in a Laravel project.
License: MIT License
A package to manage feature flagging in a Laravel project.
License: MIT License
Why yo not using morph relation for featurables
table?
$table->morphs('featurable');
I have added the following line my app.php under alias array
'Feature' => \LaravelFeature\Facade\Feature::class,
and added following code to my controller
Feature::add('auto_dispatch', false);
but it says me - FatalErrorException in FeaturesUIController.php line 20:
Class 'App\Http\Controllers\Feature' not found
This looks like a very promising project I'd love to try on our new server - hoping for PHP 8 support soon.
Apologies, this isn't particularly an issue, possibly more of a documentation update/clarification.
On the declare a new feature section of the documentation:
Declare a New Feature
Let's say you have a new feature that you want to keep hidden until a certain moment. We will call it "page_code_cleaner". Let's add it to our application:
Can you advise where you would advise is the best place in your application to add you Feature:add
's? We originally added this into the boot() of the AppServiceProvider, but this ultimately updates the DB every request? Where is the best place to put this as you really only want to call this once, or would you recommend just adding a database seed to add it?
Kind regards
Paul Pounder
I am trying to use this library like the example in the README.md
file shows in my User model. I get this error:
FatalErrorException in User.php line 29:
Trait 'LaravelFeature\Featurable' not found
User.php Model
<?php
namespace App\Models;
use App\Models\User;
use OwenIt\Auditing\Auditable;
use Laravel\Passport\HasApiTokens;
use Illuminate\Notifications\Notifiable;
use Illuminate\Foundation\Auth\User as Authenticatable;
use Mpociot\Teamwork\Traits\UserHasTeams;
use Skybluesofa\Followers\Traits\Followable;
use LaravelFeature\Domain;
use LaravelFeature\Featurable\FeaturableInterface;
use LaravelFeature\Featurable;
use LaravelFeature;
class User extends Authenticatable implements FeaturableInterface
{
use HasApiTokens, Notifiable, Auditable, UserHasTeams, Followable, Featurable;
}
I have tried adding many different use
combinations at the top of the file for the namespace but with no luck. Can someone please post the correct namespace usage?
Tag 0.2.0 still requires php version 7.1.* instead of ^7.1 like in master branch. Probably you will have to create new tag from master branch. Cheers
I need a way to disable the migrations that are run automatically when I run php artisan migrate
You might need that when you need a different repository (features might be hardcodedd or kept in a different database than the default one)
a config key that default would be enabled
Any environment
Hi.
It's working on laravel 5.4?
Because I try to install this fantastic package to my laravel, composer have it, but when I use php artisan migrate, nothing happens.
Composer require laravel-feature, but require "francescomalatesta/laravel-feature": "^0.1.0", but nothing happens then.
Please make it workable, I love this package! ๐ ๐ฅ
Please add Laravel 8 support.
Is there any way I can check if the feature is disabled like
if(Feature::isDisabled('page_code_cleaner')) {
//run code here
}
Thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.