TomatoPHP
Join CommunityGitHubDiscord
  • 🚀Overview
  • 🏅Support
  • 🤝Contributing
  • 🛣️Screenshots
  • Get Started
    • 🔥Environment Setup
      • 💿Configuring the server
      • 📡Install Valet
      • 🎟️Install PHPMyAdmin
    • 🚀Install
    • ✨Start Your First CRUD
  • Tomato Admin
    • 🚀Get Started
    • 🧠Install
    • 🛗Generate CRUD
    • 👓Slots
    • 🌉Widgets
    • 📖Menus
    • 🔁Requests
      • 🔁Index Request
      • 🔁JSON Request
      • 🔁Get Request
      • 🔁Store Request
      • 🔁Update Request
      • 🔁Destroy Request
    • 🎹Inputs
      • 🔆Rich Text Editor
      • 📞Phone Editor
      • 🖌️Color Switcher
      • 🔁Inputs Repeater
      • 💧Draggable
      • 👨‍💻Code Editor
      • ⚡Select Input
      • 🔚Submit
      • 🧾Items
      • 🔍Search
      • 🚁Icon
    • 🗜️Components
      • 🔗Relation Manager
      • 🧊Container
      • 👁️View Row
      • 🌉Widget
      • 🔘Button
      • 📖Menu
      • 👾Tooltip
      • ©️©️ Clipboard
      • 🛣️Slider
      • ℹ️Action Buttons
      • 🍅Application Logo
      • 🔽Dropdown
      • ⏸️Paginator
    • 📑Table
      • ✅Bulk Actions
      • 🗄️Filters
      • 🦘Slots
    • 🔓Jetstream & Fortify
    • 🆕Upgrade
  • Tomato PHP
    • 🚀Get Started
    • 🎹Use
  • Plugins
    • 🔌Get Started
    • 🏗️Create New Plugin
    • 🔓Tomato Roles
      • 📐Use
      • 🔏Developer Gate
      • 🏗️Register Permission
      • 💽Config
    • 🌎Tomato Locations
      • 🔁APIs
    • ⚙️Tomato Settings
      • 📐Use
      • 💽Config
    • 🔔Tomato Notifications
      • 📐Use
      • 🏗️Notification Service
      • 💽Config
      • 🔁APIs
    • 🔷Tomato Category
      • 📐Use
      • 💽Config
      • 🔁APIs
    • ✨Tomato Forms
      • 📐Use
      • 💽Config
      • 🔁APIs
    • 📖Tomato Menus
      • 📐Use
      • 💽Config
    • 👨‍💼Tomato CRM
      • 📐Use
      • 🏗️Auth Builder
      • 🔥Events
      • 💽Config
      • 🔁APIs
    • 💳Tomato Wallet
      • 📐Use
      • 🗂️Payment Methods
      • 💽Config
      • 🔁APIs
    • 📃Tomato CMS
      • 📐Use
      • 💽Config
    • 🎧Tomato Support
      • 📐Use
      • 💽Config
      • 🔁APIs
    • 👜Tomato Products
      • 💿Config
      • 🌆Screenshots
    • 💯Tomato Coupons
      • 💿Config
      • 🌆Screenshots
    • 🚀Tomato Orders
      • 💿Config
      • 🌆Screenshots
    • 🛍️Tomato Ecommerce
      • 🎭Install E-commerce Theme
      • 💿Config
      • 🌆Screenshots
    • 🚛Tomato Inventory
      • 💿Config
    • 🧾Tomato POS
      • 💿Config
    • 📄Tomato Invoices
      • 💿Config
    • 🏬Tomato Subscription
      • 📐Use
      • 💽Config
    • 🧪Tomato Dusk
      • 📐Use
      • 💿Config
      • 🌆Screenshots
    • ⚔️Tomato Chat
      • 🏗️Setup
      • 📐Use
      • 💽Config
    • 📱Tomato Flutter
      • 📐Use
      • 🧲Generate CRUD
      • 🚀Change Endpoint
      • ⏩Tomato Froms
      • 🛣️Screenshots
    • 🏗️Tomato Builder
      • 🧠Install
      • 🖍️Use
      • 🌆Screenshots
      • 💿Config
    • 🏗️Tomato Sections
      • 💿Config
    • 🎭Tomato Themes
      • 🏂Create New Theme
      • 🏗️Theme Builder
      • 🛍️Install E-commerce Theme
      • 💿Config
    • 📠Tomato Eddy
      • 💿Config
    • 👨‍💻Tomato User Activities
      • 💿Config
    • 👨‍💼Tomato PMS
    • ✅Tomato Tasks
    • ⌛Tomato Timer
    • ✈️Tomato API
    • 🚦Tomato Figma
    • 🌟Tomato SaaS
    • 🔤Tomato Translations
    • 👨‍💻Tomato Artisan
    • 🎒Tomato Backup
    • 📂Tomato Browser
    • 📕Tomato Logs
  • Helpers
    • 🍕Laravel Console Helpers
    • 📽️Laravel Agora
    • 💿Laravel Package Generator
  • Filament
    • 🌎Try Plugins
    • 👨‍🏭Filament Users
      • 🛣️Screenshots
      • 🏗️Installation
      • 🛡️Integration
      • 💼Use Facade Class
      • 📢Publish Assets
    • 🌎Filament Translations
      • 🛣️Screenshots
      • 🏗️Installation
      • 🇪🇬Language Switcher
      • 👨‍💻Command Line
      • 🔧Queue
      • 🔘Buttons
      • 🤖AI Integration
      • 🌠Import & Export
      • 📢Publish Assets
    • ⚙️Filament Settings Hub
      • 🛣️Screenshots
      • 🏗️Installation
      • ▶️Usage
      • 📢Publish Assets
    • 🍔Filament Menus
      • 🏗️Installation
      • 🛣️Screenshots
      • ⏩Use as Filament Navigation
      • ⏯️Use as a Livewire Component
      • 📢Publish Assets
    • 🆎Filament Types
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Register New Type
      • 🎹Use Type Helper
      • 🔄Use Type Column
      • 📢Publish Assets
    • 🔌Filament Plugins
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • ®️®️ List your package on the plugins list
      • 📶Use Selected Module in your panel
      • 🏂Get Only Current Panel Plugins
      • 🛑Stop Auto Discover Module Resources
      • 🎸Stop Using Plugins UI
      • 📢Publish Assets
    • 🦄Filament Icons
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🪄Add Custom Icons
      • 📢Publish Assets
    • 🗺️Filament Locations
      • 🛣️Screenshots
      • 🏗️Installation
      • 📢Publish Assets
    • 📢Filament Alerts
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🔥Firebase Integration
      • 🔗Slack Integration
      • 🔗Discord Integration
      • ⚙️API
      • 📢Publish Assets
    • 🦸‍♂️Filament Accounts
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🎇Use Accounts as SaaS Panel
      • 🍫Use Account Column
      • 🔔Use Notifications
      • 🗺️Use Account Locations
      • 🅰️Use Filament Types
      • 🔏Use Filament Impersonate
      • 🏢How to use a builder
      • ✌️Custom validation
      • 🆕Attach New Field
      • 🎌Attach Relation
      • 🔘Attach Table Button
      • 🛁Auth Events
      • ⚙️APIs
    • 💰Filament Wallet
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 🏁Filament Accounts Integration
      • 📢Publish Assets
    • ✨Filament Splade
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🔐Filament Developer Gate
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🏛️Filament Helpers
      • 🏗️Installation
      • ⏯️Using
    • 👨‍💻Filament Artisan
      • 🛣️Screenshots
      • 🏗️Installation
      • 🏃‍♂️Running command
      • ⚙️Configuration
      • 📢Publish Assets
    • 📂Filament Browser
      • 🛣️Screenshots
      • 🏗️Installation
      • 📢Publish Assets
    • 🔥Filament FCM
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 🖊️Filament CMS
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Custom Type
      • ⏯️Custom Author Type
      • 📺Youtube Integration
      • 🏩Behance Integration
      • 🎭Theme Manager
      • 🏨Page Builder
      • 🔡Form Builder
      • 📢Publish Assets
    • 🔗Filament API
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Usage
      • 📢Publish Assets
    • 👜Filament Ecommerce
      • 🛣️Screenshots
      • 🏗️Installation
      • 🎁Use Coupon Service
      • 📢Publish Assets
    • 🔚Filament Twilio
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • ⚔️Filament Discord
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 🦸‍♂️Send to Selected User
      • ⚡Allow Discord Error Logger
      • 📢Publish Assets
    • 🆎Filament Translation Component
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • 📒Filament Notes
      • 🛣️Screenshot
      • 🏗️Installation
      • ⏯️Using
      • 📢Publish Assets
    • 📼Filament Media Manager
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Use Component
      • 🅰️Add Custom Type
      • 📂Allow Sub Folders
      • 🦸‍♂️Allow User Access
      • 🎇Folders API
      • 📢Publish Assets
    • 💳Filament Withdrawals
      • 🛣️Screenshots
      • 🏗️Installation
      • ⏯️Custom Author Type
      • 🔡Form Builder
      • 📢Publish Assets
    • 🧾Filament POS
      • 🌄Screenshots
      • 🏗️Installation
      • 📢Publish Assets
  • Learn
    • 🛍️Build E-Commerce
    • 🙏Task To Get Start
    • 🔴Use Github
    • 🔥Deploy Laravel App Using GitHub Actions
      • 🏯Install Cloudpanel
      • 🔓Link Cloudflare
      • 🔃Clone Repo
      • 🎇Workflow
      • 🦕Deploy Script
    • 🦄Awesome TailwindCSS
    • 💻Terminal
Powered by GitBook
On this page
  • How to use
  • Use a custom form view to edit or create accounts
  • Custom create / edit validation
  • Attach New Field To Accounts
  • Publish Model

Was this helpful?

Edit on GitHub
  1. Plugins
  2. Tomato CRM

Use

this plugin makes it easy to make a starting point for your app if this app has customers to manage

but here is the problem, every app has a different way of managing customers, so we built a Facade service to control the way you want to manage your customers

How to use

just install the package and you will get everything working, it supports some features ready to use:

  • Accounts

  • Groups

  • Locations

  • Contact Us

  • Send Notifications

  • Auth APIs

  • Send OTP Events

you can activate or deactivate any feature you want from the package config file.

Use a custom form view to edit or create accounts

you can use your own create / update form for accounts, by just passing the view you when to this facade service method

use TomatoPHP\TomatoCrm\Facades\TomatoCrm;

public function boot()
{
    TomatoCrm::create(form: 'accounts.form');
    TomatoCrm::edit(form: 'accounts.form');
}

Custom create / edit validation

you can custom the validation rules for creating / editing accounts by just passing the rules you want to the facade service method


use TomatoPHP\TomatoCrm\Facades\TomatoCrm;

public function boot()
{
    TomatoCrm::validation(
        create: [
            'email' => 'unique:accounts,email',
            'type_id' => 'required|integer|exists:types,id',
        ],
        edit: [
            'email' => 'sometimes|unique:accounts,email',
            'type_id' => 'sometimes|integer|exists:types,id',
        ],
        api_create: [
            'email' => 'unique:accounts,email',
            'type_id' => 'required|integer|exists:types,id',
        ],
        api_edit: [
            'email' => 'sometimes|unique:accounts,email',
            'type_id' => 'sometimes|integer|exists:types,id',
        ]
    );

}

by using this method you can custom the validation rules for creating / editing accounts on the web and APIs

Attach New Field To Accounts

you can attach a new field to the accounts table by just passing the field name and the field type to the facade service method


use TomatoPHP\TomatoCrm\Facades\TomatoCrm;

public function boot()
{
    TomatoCrm::attach(
        key: 'birthday',
        label: __('Birthday'),
        type: 'date',
        show_on_create: false,
        show_on_edit: false
    );
}

Publish Model

you can publish the account model to your app by just running this command

php artisan vendor:publish --tag=tomato-crm-model
PreviousTomato CRMNextAuth Builder

Last updated 1 year ago

Was this helpful?

👨‍💼
📐