diff --git a/README.md b/README.md index 14c792c..ed85dcb 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,12 @@ -Package Name Here -=================================== +# Laravel D1 driver for Laravel -![CI](https://github.com/renoki-co/:package_name/workflows/CI/badge.svg?branch=master) -[![codecov](https://codecov.io/gh/renoki-co/:package_name/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/:package_name/branch/master) +![CI](https://github.com/renoki-co/laravel-d1/workflows/CI/badge.svg?branch=master) +[![codecov](https://codecov.io/gh/renoki-co/laravel-d1/branch/master/graph/badge.svg)](https://codecov.io/gh/renoki-co/laravel-d1/branch/master) [![StyleCI](https://github.styleci.io/repos/:styleci_code/shield?branch=master)](https://github.styleci.io/repos/:styleci_code) -[![Latest Stable Version](https://poser.pugx.org/renoki-co/:package_name/v/stable)](https://packagist.org/packages/renoki-co/:package_name) -[![Total Downloads](https://poser.pugx.org/renoki-co/:package_name/downloads)](https://packagist.org/packages/renoki-co/:package_name) -[![Monthly Downloads](https://poser.pugx.org/renoki-co/:package_name/d/monthly)](https://packagist.org/packages/renoki-co/:package_name) -[![License](https://poser.pugx.org/renoki-co/:package_name/license)](https://packagist.org/packages/renoki-co/:package_name) - -**Note:** Replace ```:package_name``` ```:package_description``` ```:package_namespace``` ```:package_service_provider``` ```:styleci_code``` with their correct values in [README.md](README.md), [CONTRIBUTING.md](CONTRIBUTING.md), [LICENSE](LICENSE) and [composer.json](composer.json) files, then delete this line. +[![Latest Stable Version](https://poser.pugx.org/renoki-co/laravel-d1/v/stable)](https://packagist.org/packages/renoki-co/laravel-d1) +[![Total Downloads](https://poser.pugx.org/renoki-co/laravel-d1/downloads)](https://packagist.org/packages/renoki-co/laravel-d1) +[![Monthly Downloads](https://poser.pugx.org/renoki-co/laravel-d1/d/monthly)](https://packagist.org/packages/renoki-co/laravel-d1) +[![License](https://poser.pugx.org/renoki-co/laravel-d1/license)](https://packagist.org/packages/renoki-co/laravel-d1) This is where your description should go. Try and limit it to a paragraph or two. Consider adding a small example. @@ -18,19 +15,13 @@ This is where your description should go. Try and limit it to a paragraph or two You can install the package via composer: ```bash -composer require renoki-co/:package_name +composer require renoki-co/laravel-d1 ``` Publish the config: ```bash -php artisan vendor:publish --provider="RenokiCo\:package_namespace\:package_service_provider" --tag="config" -``` - -Publish the migrations: - -```bash -php artisan vendor:publish --provider="RenokiCo\:package_namespace\:package_service_provider" --tag="migrations" +php artisan vendor:publish --provider="RenokiCo\LaravelD1\LaravelD1ServiceProvider" --tag="config" ``` ## 🙌 Usage @@ -51,7 +42,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details. ## 🔒 Security -If you discover any security related issues, please email alex@renoki.org instead of using the issue tracker. +If you discover any security related issues, please email instead of using the issue tracker. ## 🎉 Credits diff --git a/composer.json b/composer.json index cde27f1..400c012 100644 --- a/composer.json +++ b/composer.json @@ -1,9 +1,17 @@ { - "name": "renoki-co/:package_name", - "description": ":package_description", - "keywords": ["laravel", "php"], + "name": "renoki-co/laravel-d1", + "description": "Cloudflare D1 database driver for Laravel.", + "keywords": [ + "laravel", + "php", + "database", + "query", + "sqlite", + "cloudflare", + "d1" + ], "license": "Apache-2.0", - "homepage": "https://github.com/renoki-co/:package_name", + "homepage": "https://github.com/renoki-co/laravel-d1", "authors": [ { "name": "Alex Renoki", @@ -12,16 +20,16 @@ } ], "require": { - "php": "^8.1" + "illuminate/database": "^9.0|^10.0" }, "autoload": { "psr-4": { - "RenokiCo\\:package_namespace\\": "src/" + "RenokiCo\\LaravelD1\\": "src/" } }, "autoload-dev": { "psr-4": { - "RenokiCo\\:package_namespace\\Test\\": "tests" + "RenokiCo\\LaravelD1\\Test\\": "tests" } }, "scripts": { @@ -40,7 +48,7 @@ "extra": { "laravel": { "providers": [ - "RenokiCo\\:package_namespace\\:package_service_provider" + "RenokiCo\\LaravelD1\\LaravelD1ServiceProvider" ] } } diff --git a/config/.gitkeep b/config/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/database/migrations/.gitkeep b/database/migrations/.gitkeep deleted file mode 100644 index e69de29..0000000 diff --git a/src/LaravelD1ServiceProvider.php b/src/LaravelD1ServiceProvider.php new file mode 100644 index 0000000..de18dfd --- /dev/null +++ b/src/LaravelD1ServiceProvider.php @@ -0,0 +1,28 @@ +publishes([ - __DIR__.'/../config/config.php' => config_path('config.php'), - ], 'config'); - - $this->mergeConfigFrom( - __DIR__.'/../config/config.php', 'config' - ); - } - - /** - * Register the service provider. - * - * @return void - */ - public function register() - { - // - } -} diff --git a/tests/Models/User.php b/tests/Models/User.php index 1cde022..f99f33a 100644 --- a/tests/Models/User.php +++ b/tests/Models/User.php @@ -1,6 +1,6 @@ define(\RenokiCo\:package_namespace\Test\Models\User::class, function () { +$factory->define(\RenokiCo\LaravelD1\Test\Models\User::class, function () { return [ 'name' => 'Name'.Str::random(5), 'email' => Str::random(5).'@gmail.com',