{"id":22004785,"url":"https://github.com/expdev07/nova-slim-field","last_synced_at":"2025-05-05T17:33:32.727Z","repository":{"id":56980498,"uuid":"455190790","full_name":"ExpDev07/nova-slim-field","owner":"ExpDev07","description":"🖼️ Laravel Nova Field for uploading and cropping images using \"Slim Image Cropper\" (https://pqina.nl/slim/).","archived":false,"fork":false,"pushed_at":"2022-02-06T14:11:14.000Z","size":548,"stargazers_count":4,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-05-05T17:31:51.203Z","etag":null,"topics":["crop","doka","field","image","nova","pintura"],"latest_commit_sha":null,"homepage":"","language":"PHP","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/ExpDev07.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":"2022-02-03T14:11:06.000Z","updated_at":"2024-02-25T03:36:22.000Z","dependencies_parsed_at":"2022-08-21T08:40:50.880Z","dependency_job_id":null,"html_url":"https://github.com/ExpDev07/nova-slim-field","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Fnova-slim-field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Fnova-slim-field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Fnova-slim-field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ExpDev07%2Fnova-slim-field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ExpDev07","download_url":"https://codeload.github.com/ExpDev07/nova-slim-field/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252542594,"owners_count":21764995,"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":["crop","doka","field","image","nova","pintura"],"created_at":"2024-11-30T00:17:12.863Z","updated_at":"2025-05-05T17:33:32.708Z","avatar_url":"https://github.com/ExpDev07.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1\u003e\n    Nova Slim Field\n\u003c/h1\u003e\n\n[![Latest Stable Version](http://poser.pugx.org/expdev07/nova-slim-field/v)](https://packagist.org/packages/expdev07/nova-slim-field) [![Total Downloads](http://poser.pugx.org/expdev07/nova-slim-field/downloads)](https://packagist.org/packages/expdev07/nova-slim-field) [![Latest Unstable Version](http://poser.pugx.org/expdev07/nova-slim-field/v/unstable)](https://packagist.org/packages/expdev07/nova-slim-field) [![License](http://poser.pugx.org/expdev07/nova-slim-field/license)](https://packagist.org/packages/expdev07/nova-slim-field) [![PHP Version Require](http://poser.pugx.org/expdev07/nova-slim-field/require/php)](https://packagist.org/packages/expdev07/nova-slim-field)\n\nThis package adds a new Laravel Nova field for cropping images using the \"Slim Image Cropper\" (https://pqina.nl/slim/). This is an \nalternative to Doka (now Pintura) for those who want a less expensive cropping experience.\n\n## Install\n\n#### Composer install the package:\n\n```\ncomposer require expdev07/nova-slim-field\n```\n\n#### Publish the config:\n\n```\nphp artisan vendor:publish --provider=\"ExpDev07\\NovaSlimField\\SlimFieldServiceProvider\" --tag=\"config\"\n```\n\n#### Configure the Slim assets:\n\n```php\n/**\n * Configure the path to the slim assets.\n */\n'slim' =\u003e [\n    'jquery' =\u003e public_path('/js/jquery.js'),\n    'js' =\u003e public_path('/js/slim.js'),\n    'css' =\u003e public_path('/css/slim.css'),\n]\n```\n\n## Using\n\nSlim extends the \u003ca href=\"https://nova.laravel.com/docs/1.0/resources/fields.html#image-field\"\u003eImage Field\u003c/a\u003e, so you have all your normal options such as deciding how to store the image.\n\n```php\n/**\n * Get the fields displayed by the resource.\n *\n * @param Request $request\n * @return array\n */\npublic function fields(Request $request): array\n{\n    return [\n        Slim::make('Featured Image')-\u003ecropable(true)-\u003eratio('1:1')-\u003esize('300,300'),\n    ];\n}\n```\n\n## Thanks to\n\n- ExpDev07 - Creator and maintainer.\n- ... All the creators and maintainers of Nova.\n\n## Screenshots\n\n#### Empty state\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/ExpDev07/nova-slim-field/blob/main/screenshots/screenshot_1.JPG\" alt=\"\"\u003e\n\u003c/p\u003e\n\n#### Image uploaded\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/ExpDev07/nova-slim-field/blob/main/screenshots/screenshot_2.JPG\" alt=\"\"\u003e\n\u003c/p\u003e\n\n#### Cropping image\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/ExpDev07/nova-slim-field/blob/main/screenshots/screenshot_3.JPG\" alt=\"\"\u003e\n\u003c/p\u003e\n\n#### Image cropped\n\n\u003cp\u003e\n    \u003cimg src=\"https://github.com/ExpDev07/nova-slim-field/blob/main/screenshots/screenshot_4.JPG\" alt=\"\"\u003e\n\u003c/p\u003e\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpdev07%2Fnova-slim-field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fexpdev07%2Fnova-slim-field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fexpdev07%2Fnova-slim-field/lists"}