├── .gitignore ├── src └── NovaUuidSupportServiceProvider.php ├── README.md ├── composer.json ├── database └── migrations │ └── 2019_11_21_000000_change_action_event_ids_to_strings.php └── LICENSE /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor/ 2 | composer.lock 3 | -------------------------------------------------------------------------------- /src/NovaUuidSupportServiceProvider.php: -------------------------------------------------------------------------------- 1 | app->runningInConsole()) { 12 | $this->loadMigrationsFrom(__DIR__.'/../database/migrations'); 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Laravel Nova: Uuid support 2 | 3 | This package adds support to Laravel Nova for resources and users that have string identifiers such as uuid's. 4 | 5 | ### Usage 6 | 7 | Note that you should only use this package in Laravel Nova projects. 8 | 9 | ```bash 10 | # install the package 11 | composer require madewithlove/laravel-nova-uuid-support 12 | 13 | # run your migrations 14 | php artisan migrate 15 | ``` 16 | 17 | That's it, your Laravel Nova installation can now handle resources and users with string identifiers. 18 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "madewithlove/laravel-nova-uuid-support", 3 | "description": "Adds uuid and other string identifier support to Laravel Nova", 4 | "keywords": [ 5 | "laravel", 6 | "nova", 7 | "uuid", 8 | "string", 9 | "identifiers", 10 | "primary" 11 | ], 12 | "type": "library", 13 | "license": "MIT", 14 | "require": { 15 | "php": "^7.3|^8.0", 16 | "illuminate/support": "^5.7.15 | 5.8.* | ^6.0 | ^7.0 | ^8.0 | ^9.0|^10.0|^11.0" 17 | }, 18 | "autoload": { 19 | "psr-4": { 20 | "Madewithlove\\NovaUuidSupport\\": "src" 21 | } 22 | }, 23 | "extra": { 24 | "laravel": { 25 | "providers": [ 26 | "Madewithlove\\NovaUuidSupport\\NovaUuidSupportServiceProvider" 27 | ] 28 | } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /database/migrations/2019_11_21_000000_change_action_event_ids_to_strings.php: -------------------------------------------------------------------------------- 1 | string('actionable_id', 36)->change(); 18 | $table->string('model_id', 36)->change(); 19 | $table->string('target_id', 36)->change(); 20 | $table->string('user_id', 36)->change(); 21 | }); 22 | } 23 | 24 | /** 25 | * Reverse the migrations. 26 | * 27 | * @return void 28 | */ 29 | public function down() 30 | { 31 | // this migration cannot be rolled back without losing data 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2019 madewithlove 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | --------------------------------------------------------------------------------