{"id":36994106,"url":"https://github.com/laradium/laradium","last_synced_at":"2026-01-13T23:46:19.128Z","repository":{"id":34199457,"uuid":"147243949","full_name":"laradium/laradium","owner":"laradium","description":null,"archived":false,"fork":false,"pushed_at":"2023-01-03T19:33:54.000Z","size":22467,"stargazers_count":3,"open_issues_count":28,"forks_count":3,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-04-04T05:23:39.702Z","etag":null,"topics":["cms","laravel","php"],"latest_commit_sha":null,"homepage":null,"language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/laradium.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-03T19:13:12.000Z","updated_at":"2024-04-04T05:23:39.703Z","dependencies_parsed_at":"2023-01-15T05:15:23.022Z","dependency_job_id":null,"html_url":"https://github.com/laradium/laradium","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"purl":"pkg:github/laradium/laradium","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laradium%2Flaradium","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laradium%2Flaradium/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laradium%2Flaradium/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laradium%2Flaradium/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/laradium","download_url":"https://codeload.github.com/laradium/laradium/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/laradium%2Flaradium/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28405304,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-13T21:51:37.118Z","status":"ssl_error","status_checked_at":"2026-01-13T21:45:14.585Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cms","laravel","php"],"created_at":"2026-01-13T23:46:19.054Z","updated_at":"2026-01-13T23:46:19.119Z","avatar_url":"https://github.com/laradium.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"Package allows you to create advanced CRUD views with relations in light weight \nadmin panel. Using plain laravel database structure, models and VueJS which \nallows to make it very flexible and can be adjusted up to your needs. \n\n# Installation\n\n## For local development\n1. Add this to your project repositories list in `composer.json` file\n\n\n```\n\"repositories\": [\n    {\n        \"type\": \"path\",\n        \"url\": \"../packages/laradium\"\n    }\n]\n```\n\nDirectory structure should look like this\n```\n-Project\n-packages\n    --laradium\n    --laradium-content\n```\n## For global use\n\n```\n\"repositories\": [\n        {\n            \"type\": \"git\",\n            \"url\": \"https://github.com/laradium/laradium.git\"\n        }\n    ]\n```\n\n2. ```composer require laradium/laradium dev-master```\n3. ```php artisan vendor:publish --tag=laradium```\n4. Configure `config/laradium.php` file with your preferences\n5. Comment out `Illuminate\\Translation\\TranslationServiceProvider::class,` in `config/app.php` in order to enable translations\n6. Run `php artisan migrate`\n\nYou should be up and running\n\nAdmin panel will be under http://your-domain.com/admin\n\nDefault credentials (_can be change in config file_): \nemail:admin@laradium.com, \npw: laradium2018\n\n# Creating new resource\n\n1. ```php artisan laradium:resource Task```\n\nIt will create new resource under `App\\Laradium\\Resource`, resource should look like this\n```\n\u003c?php\n\nnamespace App\\Laradium\\Resources;\n\nuse Laradium\\Laradium\\Base\\AbstractResource;\nuse Laradium\\Laradium\\Base\\FieldSet;\nuse Laradium\\Laradium\\Base\\ColumnSet;\nuse App\\Models\\Task;\n\nClass TaskResource extends AbstractResource\n{\n\n    /**\n     * @var string\n     */\n    protected $resource = Task::class;\n\n    /**\n     * @return \\Laradium\\Laradium\\Base\\Resource\n     */\n    public function resource()\n    {\n        return laradium()-\u003eresource(function (FieldSet $set) {\n            $set-\u003etext('type')-\u003erules('required|min:3');\n        });\n    }\n\n     /**\n     * @return \\Laradium\\Laradium\\Base\\Table\n     */\n    public function table()\n    {\n        return laradium()-\u003etable(function (ColumnSet $column) {\n            $column-\u003eadd('id', '#ID');\n        });\n    }\n}\n```\n\nYou will have 2 methods `resource` and `table`.\n\n# Resource\nHere you can specify field configuration for your create and edit actions.\n\n## Available field list\n\n## Text\n\n```\n$set-\u003etext('name')-\u003erules('required')-\u003etranslatable();\n```\n\n## Textarea\n```\n$set-\u003etextarea('name')-\u003erules('required')-\u003etranslatable();\n```\n\n## Wysiwyg\n```\n$set-\u003ewysiwyg('name')-\u003erules('required')-\u003etranslatable();\n```\n\n## Email\n```\n$set-\u003eemail('email')-\u003erules('required|email');\n```\n\n## Password\n```\n$set-\u003epassword('password')-\u003erules('required|confirmed|min:3|max:36');\n$set-\u003epassword('password_confirmation');\n```\n\n## Boolean\n```\n$set-\u003eboolean('is_active');\n```\n\n## Select\n\n```\n$set-\u003eselect('target')\n    -\u003eoptions([\n        '_self'   =\u003e 'Self',\n        '_target' =\u003e 'Target',\n    ])\n    -\u003erules('required');\n```\n\n## Date\n\n```\n$set-\u003edate('starts_at')-\u003erules('date_format:Y-m-d');\n```\n\n## Time\n\n```\n$set-\u003etime('starts_at')-\u003erules('date_format:H:i');\n```\n\n## DateTime\n\n```\n$set-\u003edatetime('starts_at')-\u003erules('date_format:Y-m-d H:i');\n```\n\n## Color\n\n```\n$set-\u003ecolor('color');\n```\n\n## HasMany\n1. First argument must be the name of the relation\n2. Fields method should contain fields that is required for relation\n3. You can make items sortable, if you add sortable column to your table and specify column name in `sortable` method\n4. You can remove create and/or delete actions for items by adding `actions` method\n```\n$set-\u003ehasMany('items')\n    -\u003efields(function (FieldSet $set) {\n        $set-\u003eboolean('is_active');\n        $set-\u003eselect('target')-\u003eoptions([\n            '_self'   =\u003e 'Self',\n            '_target' =\u003e 'Target',\n        ])-\u003erules('required');\n        $set-\u003etext('name')-\u003erules('required')-\u003etranslatable();\n        $set-\u003etext('url')-\u003erules('required')-\u003etranslatable();\n    })\n    -\u003esortable('sequence_no')\n    -\u003eactions([]); // This will remove both create/delete actions\n```\n\n## HasOne\n1. First argument must be the name of the relation\n2. Fields method should contain fields that is required for relation\n```\n$set-\u003ehasOne('author')\n    -\u003efields(function (FieldSet $set) {\n        $set-\u003etext('name');\n    });\n```\n\n## BelongsTo \n1. First argument must be class of relation where items will belong\n```\n$set-\u003ebelongsTo(Article::class)\n    -\u003ehideIf(true) // optional if value is true, field will be hidden and value will be set from \"default\" method\n    -\u003edefault(2);\n```\n\n## BelongsToMany\n1. First argument must be name of the relation in model\n2. Second argument is label for field\n```\n$set-\u003ebelongsToMany('menuItems', 'Menu items');\n```\n\n## Tab (Lets you put certain field groups under certain tabs for better UI)\n1. First argument must be the name of the tab\n2. Fields method must contain fields that will be under this tab\n\n```\n$set-\u003etab('Items')-\u003efields(function (FieldSet $set) {\n    $set-\u003ehasMany('items')-\u003efields(function (FieldSet $set) {\n        $set-\u003eboolean('is_active');\n        $set-\u003eselect('target')-\u003eoptions([\n            '_self'   =\u003e 'Self',\n            '_target' =\u003e 'Target',\n        ])-\u003erules('required');\n        $set-\u003etext('name')-\u003erules('required')-\u003etranslatable();\n        $set-\u003etext('url')-\u003erules('required')-\u003etranslatable();\n    })-\u003esortable('sequence_no');\n});\n```\n\n## File\nFor managing files we use https://github.com/czim/laravel-paperclip package.\nYou don't need to set it up individually because it comes with base package. \n```\n$set-\u003efile('image');\n```\nBy default package uses Laravel's public storage, we do not like to deal with symlinks that's why we have changed configuration to this:\nStorage configuration in `config/paperclip.php`\n\n```\n'storage' =\u003e [\n    // The Laravel storage disk to use.\n    'disk' =\u003e 'public_root',\n\n    // Per disk, the base URL where attachments are stored at\n    'base-urls' =\u003e [\n        'public_root' =\u003e config('app.url') . '/uploads',\n    ],\n],\n```\n\nAdd new disk to `config/filesystems.php`\n\n```\n'public_root' =\u003e [\n    'driver' =\u003e 'local',\n    'root'   =\u003e public_path('uploads'),\n],\n```\n\n### Available methods for fields\n\n```\n- attr() // You can pass array of html attributes to add to the field\n$set-\u003etext('field')-\u003eattr([\n    'required' =\u003e 'required'\n]);\n\n- col() // With this method you can change layout of the fields in form\n$set-\u003etext('field')-\u003ecol(6, 'lg'); // Default type is - md, so if you need md, you can only specify col number\n$set-\u003etext('field-2')-\u003ecol(6, 'lg');\n\n- options() // Pass options to the `select` field\n$set-\u003eselect('field')-\u003eoptions([\n    'key' =\u003e 'value'\n]);\n\n- rules() // You can specify validation rules for this field\n$set-\u003etext('field')-\u003erules('required|min:1|max:255');\n\n- translatable() // Make field translatable\n$set-\u003etext('field')-\u003etranslatable();\n\n# Table\n\nAvailable fields for columns\n\n## Add\n```\n$column-\u003eadd('column_name_in_table', 'Nice column name');\n```\n\n## Editable (Allows you to edit database column from index view)\n```\n$column-\u003eadd('column_name_in_table', 'Nice column name')-\u003eeditable();\n```\n\n## Modify (Allow you to modify columns data output)\n```\n$column-\u003eadd('is_active', 'Is Visible?')\n    -\u003emodify(function ($item) {\n        return $item-\u003eis_active ? 'Yes' : 'No';\n    });\n```\n\n## Title\n```\n$column-\u003eadd('column_name_in_table')-\u003etitle('Nice column name');\n```\n\n## Translatable\n```\n$column-\u003eadd('title')-\u003etranslatable();\n```\nNOTE: You need to specify additional method for Table `relations(['translations'])` to enable eager loading and improve performance\n\nAvailable methods for Table\n\n## Actions (create, edit, delete)\n```\n-\u003eactions(['edit', 'delete'])\n```\n## Relations\n```\n-\u003erelations(['translations'])\n```\n## Additional view which will be included above the table\n```\n-\u003eadditionalView('laradium-content::admin.pages.index-top', compact('channels'));\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaradium%2Flaradium","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flaradium%2Flaradium","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flaradium%2Flaradium/lists"}