{"id":22238529,"url":"https://github.com/tomatophp/filament-cms","last_synced_at":"2025-04-13T00:44:06.376Z","repository":{"id":239003555,"uuid":"798248759","full_name":"tomatophp/filament-cms","owner":"tomatophp","description":"Full CMS System with easy to use page builder \u0026 theme manager for FilamentPHP","archived":false,"fork":false,"pushed_at":"2024-11-27T12:42:40.000Z","size":3895,"stargazers_count":91,"open_issues_count":8,"forks_count":18,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-13T00:43:57.647Z","etag":null,"topics":["blog","cms","content-management-system","filamentphp-plugin","website-builder"],"latest_commit_sha":null,"homepage":"https://tomatophp.com/en/open-source/filament-cms","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tomatophp.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":["3x1io"]}},"created_at":"2024-05-09T11:54:48.000Z","updated_at":"2025-04-12T23:02:01.000Z","dependencies_parsed_at":"2024-08-14T12:58:51.327Z","dependency_job_id":"235b990d-0ab2-4e81-8fe0-cdd175962d32","html_url":"https://github.com/tomatophp/filament-cms","commit_stats":null,"previous_names":["tomatophp/filament-cms"],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-cms","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-cms/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-cms/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tomatophp%2Ffilament-cms/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tomatophp","download_url":"https://codeload.github.com/tomatophp/filament-cms/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248650419,"owners_count":21139672,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["blog","cms","content-management-system","filamentphp-plugin","website-builder"],"created_at":"2024-12-03T03:16:57.986Z","updated_at":"2025-04-13T00:44:06.356Z","avatar_url":"https://github.com/tomatophp.png","language":"PHP","funding_links":["https://github.com/sponsors/3x1io"],"categories":[],"sub_categories":[],"readme":"![Screenshot](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/3x1io-tomato-cms.jpg)\n\n# Filament CMS Builder\n\n[![Latest Stable Version](https://poser.pugx.org/tomatophp/filament-cms/version.svg)](https://packagist.org/packages/tomatophp/filament-cms)\n[![License](https://poser.pugx.org/tomatophp/filament-cms/license.svg)](https://packagist.org/packages/tomatophp/filament-cms)\n[![Downloads](https://poser.pugx.org/tomatophp/filament-cms/d/total.svg)](https://packagist.org/packages/tomatophp/filament-cms)\n\nFull CMS System with easy to use page builder \u0026 theme manager for FilamentPHP\n\n## Installation\n\n```bash\ncomposer require tomatophp/filament-cms\n```\nafter install your package please run this command\n\n**NOTE** if you need to custom some feature please don't use this command and follow the next steps because this step run migration and you need to custom config before run migration.\n\n```bash\nphp artisan filament-cms:install\n```\n\nfinally register the plugin on `/app/Providers/Filament/AdminPanelProvider.php`\n\n```php\n-\u003eplugin(\n    \\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()\n        -\u003euseCategory()\n        -\u003eusePost()\n        -\u003eallowExport()\n        -\u003eallowImport()\n)\n```\n\nnow please publish and migrate media table \n\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\MediaLibrary\\MediaLibraryServiceProvider\" --tag=\"medialibrary-migrations\"\nphp artisan migrate\n```\n## Screenshots\n\n![Posts List](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/posts-list.png)\n![Posts Create](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/create-post.png)\n![Posts SEO](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/post-seo.png)\n![Posts View](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/view-post.png)\n![Category List](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/category-list.png)\n![Category Create](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/create-category.png)\n![Form List](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/form-list.png)\n![Create Form](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/create-form.png)\n![From Fields](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/form-fields.png)\n![Create Field](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/create-field.png)\n![Form Preview](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/preview-form.png)\n![View Form Request](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/view-request.png)\n\n## Features\n\n- [x] Content Manager\n- [x] Content Comments \u0026 Ratings\n- [x] Youtube Meta Integration\n- [x] Behanace Content Importer\n- [x] GitHub Content Importer\n- [x] Content Import \u0026 Export\n- [x] Page Builder\n- [x] Theme Manager\n- [x] Form Builder\n- [ ] Ticketing System\n- [ ] REST API\n\n## Allow Import From Youtube URL\n\nyou can allow import content from youtube by adding `YOUTUBE_KEY` to your `.env`\n\n```dotenv\nYOUTUBE_KEY=YOUR_YOUTUBE_KEY\n```\n\nnow on your panel provider `/app/Providers/Filament/AdminPanelProvider.php` add this method\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()-\u003eallowYoutubeImport())\n```\n\n## Allow Import From Behanace URL \n\nfirst of all you need to install `dusk` as a main package to allow this feature\n\n```bash\ncomposer require laravel/dusk\n```\n\nnow install dusk driver\n\n```bash\nphp artisan dusk:install\n```\n\nnow you need to allow behanace import on your panel provider `/app/Providers/Filament/AdminPanelProvider.php` add this method\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()-\u003eallowBehanceImport())\n```\n\n## Add Custom Type to CMS\n\nyou can add a custom type to the CMS by using Facade method on your AppServiceProvider `boot()` method \n\n```php\nuse TomatoPHP\\FilamentCms\\Facades\\FilamentCMS;\nuse TomatoPHP\\FilamentCms\\Services\\Contracts\\CmsType;\n\npublic function boot()\n{\n    FilamentCMS::types()-\u003eregister([\n        CmsType::make('building')\n            -\u003elabel('Buildings')\n            -\u003eicon('heroicon-o-home')\n            -\u003ecolor('danger')\n    ]);\n}\n\n```\n\n## Add More Authors Types\n\nyou can add more authors types by using Facade method on your AppServiceProvider `boot()` method \n\n```php\nuse TomatoPHP\\FilamentCms\\Facades\\FilamentCMS;\nuse TomatoPHP\\FilamentCms\\Services\\Contracts\\CmsAuthor;\n\npublic function boot()\n{\n    FilamentCMS::authors()-\u003eregister([\n        CmsAuthor::make('Admin')\n            -\u003emodel(\\App\\Models\\User::class)\n    ]);\n}\n\n```\n\n## Use Theme Manager\n\nthe theme manager is build with Laravel Modules so you need to install it first\n\n**Note:** if you are install `tomatophp/filament-plugins` you don't need to install `nwidart/laravel-modules` because it's already installed\n\n```bash\ncomposer require nwidart/laravel-modules\n```\n\nnow on your `composer.json` add to `psr-4` autoload\n\n```json\n{\n    \"autoload\": {\n        \"psr-4\": {\n            \"App\\\\\": \"app/\",\n            \"Modules\\\\\": \"Modules/\"\n        }\n    }\n}\n```\n\nnow run this command to autoload themes\n\n```bash\ncomposer dump-autoload\n```\n\nand you need another package for caching and return themes as model we use `sushi` package\n\n```bash\ncomposer require calebporzio/sushi\n```\n\nnow on your config `filament-cms`\n\n```php\n\u003c?php\n\nreturn [\n    /*\n     * ---------------------------------------------------\n     * Allow Features\n     * ---------------------------------------------------\n     */\n    \"features\" =\u003e [\n        \"theme-manager\" =\u003e true,\n    ],\n];\n```\n\nnow you need to active the settings table\n\n```bash\nphp artisan vendor:publish --provider=\"Spatie\\LaravelSettings\\LaravelSettingsServiceProvider\" --tag=\"migrations\"\nphp artisan migrate\n```\n\nnow you can use Theme manager to manage multi frontend themes on your app, on your panel provider `/app/Providers/Filament/AdminPanelProvider.php` add this method\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()-\u003euseThemeManager())\n```\n\nnow you can access `/admin/themes` to manage your themes and you can create new theme use this command line\n\n```bash\nphp artisan filament-cms:theme\n```\n\nyou will find a new module with custom `module.json` file on your `Modules` directory\n\n## Use Page Builder\n\nthe page builder make it very easy to custom your page and generate an autoloaded pages to build your website using `Sections` to start using it you need to add this method on your panel provider `/app/Providers/Filament/AdminPanelProvider.php`\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()-\u003eusePageBuilder())\n```\n\nfirst thing you need to create a Section on your AppServiceProvider `boot()` method\n\n```php\nuse TomatoPHP\\FilamentCms\\Services\\Contracts\\Section;\nuse TomatoPHP\\FilamentCms\\Facades\\FilamentCMS;\nuse Filament\\Forms\\Components\\TextInput;\n\nFilamentCMS::themes()-\u003eregister([\n    Section::make('hero')\n        -\u003elabel('Hero Section')\n        -\u003eview('sections.pages.hero')\n        -\u003eform([\n            TextInput::make('title')\n                -\u003elabel('title'),\n            TextInput::make('description')\n                -\u003elabel('description'),\n            TextInput::make('url')\n                -\u003eurl()\n                -\u003elabel('url'),\n            TextInput::make('button')\n                -\u003elabel('button'),\n        ])\n]);\n\n```\n\n**NOTE:** the section key must be unique \n\nafter register your section you can start using page builder, you need to create a new route for your page like this\n\n```php\nuse Illuminate\\Support\\Facades\\Route;\n\nRoute::get('/', function () {\n    $page = load_page('/');\n    return view('welcome', compact('page'));\n});\n\n```\n\nas you see you need to use `load_page` helper to load your page and pass it to your view, this method check if the page exists by `slug` and return the page data if page don't exists or deleted it will restore it or create it for you \n\non your `welcome.blade.php` file you need to use this blade component \n\n```html\n\u003cx-tomato-builder-toolbar :page=\"$page\" allow-layout/\u003e\n```\n\nif you need to use Filament Layout to make it easy to active Livewire / Tailwind Style use `allow-layout` attribute if you need to use it without any style you can use it without this attribute\n\nnow if you open your page you will find the builder view like this\n\n![Page Builder](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/page-builder.png)\n![Page Builder Prview](https://raw.githubusercontent.com/tomatophp/filament-cms/master/arts/page-builder-preview.png)\n\n## Add Form Field Type\n\nyou can add more fields to the form builder by use this method on your provider.\n\n```php\nuse TomatoPHP\\FilamentCms\\Services\\FilamentCMSFormFields;\nuse TomatoPHP\\FilamentCms\\Services\\Contracts\\CmsFormFieldType;\n\nFilamentCMSFormFields::register([\n    CmsFormFieldType::make('code')\n        -\u003eclassName(CodeEditor::class)\n        -\u003ecolor('warning')\n        -\u003eicon('heroicon-s-code-bracket-square')\n        -\u003elabel('Code Editor'),\n]);\n```\n\n## Use Your Form Builder\n\nafter create your form you can use it by `key` like this\n\n```php\nuse TomatoPHP\\FilamentCms\\Services\\FilamentCMSFormBuilder;\n\nFilamentCMSFormBuilder::make('xvssd')-\u003ebuild()\n```\n\n## Use Form Requests to Submit your form data\n\nyou can use form requests to submit your form data by use this method on your provider.\n\n```php\nuse TomatoPHP\\FilamentCms\\Services\\FilamentCMSFormBuilder;\n\nFilamentCMSFormBuilder::make('xvssd')-\u003esend($data)\n```\n\n## Use Filament Shield\n\nyou can use the shield to protect your resource and allow user roles by install it first\n\n```bash\ncomposer require bezhansalleh/filament-shield\n```\n\nAdd the Spatie\\Permission\\Traits\\HasRoles trait to your User model(s):\n\n```php\nuse Illuminate\\Foundation\\Auth\\User as Authenticatable;\nuse Spatie\\Permission\\Traits\\HasRoles;\n\nclass User extends Authenticatable\n{\n    use HasRoles;\n\n    // ...\n}\n```\nPublish the config file then setup your configuration:\n\n```php\n-\u003eplugin(\\BezhanSalleh\\FilamentShield\\FilamentShieldPlugin::make())\n```\n\nNow run the following command to install shield:\n\n```bash\nphp artisan shield:install\n```\n\nNow we can [publish the package assets]([https://github.com/bezhanSalleh/filament-shield](https://github.com/tomatophp/filament-users?tab=readme-ov-file#publish-assets)).\n\n```bash\nphp artisan vendor:publish --tag=\"filament-users-config\"\n```\n\nnow you need to allow it on the plugin options\n\n```php\n-\u003eplugin(\\TomatoPHP\\FilamentCms\\FilamentCMSPlugin::make()-\u003eallowShield())\n```\n\nfor more information check the [Filament Shield](https://github.com/bezhanSalleh/filament-shield)\n\n## Use Post Events\n\nsometimes you need to add some custom logic to your post like send email or notify user you can use the post events to do this, and the supported events is:\n\n```php\n\\TomatoPHP\\FilamentCms\\Events\\PostCreated::class\n\\TomatoPHP\\FilamentCms\\Events\\PostUpdated::class\n\\TomatoPHP\\FilamentCms\\Events\\PostDeleted::class\n```\n\n## Publish Assets\n\nyou can publish config file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-cms-config\"\n```\n\nyou can publish views file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-cms-views\"\n```\n\nyou can publish languages file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-cms-lang\"\n```\n\nyou can publish migrations file by use this command\n\n```bash\nphp artisan vendor:publish --tag=\"filament-cms-migrations\"\n```\n\n## Other Filament Packages\n\nCheckout our [Awesome TomatoPHP](https://github.com/tomatophp/awesome)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomatophp%2Ffilament-cms","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftomatophp%2Ffilament-cms","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftomatophp%2Ffilament-cms/lists"}