Download the PHP package lastdino/approval-flow without Composer

On this page you can find all versions of the php package lastdino/approval-flow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package approval-flow

Laravel Approval Flow

Laravel Approval Flowは、Laravelアプリケーションに承認フローと段階的な承認プロセスを追加するためのパッケージです。

特徴

インストール

Composerを使ってインストールしてください:

下記のコマンドで必要なマイグレーションファイルの出力とマイグレーションを実行します:

Configファイルは下記のコマンドで出力可能です:

出力されたConfigファイルの中身は次のような感じです:

オプションとして次のコマンドを実行するとViewファイルも出力可能です:

言語ファイルを出力する場合は以下のコマンドを実行してください:

CSSアセットファイルを出力する場合は以下のコマンドを実行してください:

基本的な使用方法

1. Livewireレイアウトの設定

使用しているLivewireレイアウトファイルの<body>タグの上部に以下のスタックディレクティブを追加してください:

2. モデルの設定

承認フローを使用したいモデルに必要なトレイトを追加します:

3. 承認フロータスクの登録

registerApprovalFlowTaskメソッドを使用して承認フロータスクを登録します:

registerApprovalFlowTaskメソッドは、以下のパラメータを受け取ります:

承認フロータスクが作成されると、設定されたフローデータに基づいて自動的に処理が開始されます。

申請のキャンセル

申請者は、承認プロセスが完了する前に申請をキャンセルすることができます。キャンセルは、cancelApprovalFlowTaskメソッドを使用して行います:

注意事項:

4. 承認時と拒否時の振る舞いのカスタマイズ

デフォルトでは、モデルが承認されたとき・拒否されたときにstatusフィールドが更新されますが、これらの振る舞いはモデル側でオーバーライドできます:

5. ルート設定

パッケージは自動的に /flow プレフィックスでルートを登録します。設定ファイルでカスタマイズ可能です。

デフォルトで使用可能な主要なルート:

設定

必要な依存関係

このパッケージは以下のパッケージと連携します:

ユーザーモデルの設定

設定ファイルでユーザーモデルとロールモデルを指定してください。roles_modelにはSpatie Laravel PermissionのRoleモデルでも、独自のロールモデルでも指定可能です:

独自のロールモデルを使用する場合、そのモデルには少なくともidnameプロパティが必要です。

表示名の設定

ユーザーの表示名に使用するカラムを設定できます:

フロントエンド要件

フローエディタはjerosoler/Drawflowを使用します。ビューファイルをpublishすると、自動的に必要なCDNリンクが含まれます:

また、アセットファイルを公開するとCSSも追加されます:

アセットの変更を反映するには、必ず以下のコマンドを実行してアセットをビルドしてください:

または開発中は以下のコマンドを使用できます:

これにより、フロー編集画面で必要なCSSとJavaScriptが正しく読み込まれます。

貢献

バグ報告や機能リクエストは、GitHubのIssuesでお願いします。

プルリクエストも歓迎します:

  1. フォークしてください
  2. フィーチャーブランチを作成してください (git checkout -b feature/amazing-feature)
  3. 変更をコミットしてください (git commit -m 'Add amazing feature')
  4. ブランチにプッシュしてください (git push origin feature/amazing-feature)
  5. プルリクエストを開いてください

ライセンス

このパッケージはMIT Licenseの下で公開されています。

サポート

質問やサポートが必要な場合は、以下の方法でお問い合わせください:

変更履歴

詳細な変更履歴はCHANGELOG.mdをご確認ください。


All versions of approval-flow with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^12.0
livewire/livewire Version ^3.0
livewire/flux Version ^2.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package lastdino/approval-flow contains the following files

Loading the files please wait ....