Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
rennokki committed Jun 8, 2023
1 parent db34274 commit 3a6be19
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 64 deletions.
29 changes: 10 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.

Expand All @@ -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
Expand All @@ -51,7 +42,7 @@ Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

## 🔒 Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.
If you discover any security related issues, please email <[email protected]> instead of using the issue tracker.

## 🎉 Credits

Expand Down
24 changes: 16 additions & 8 deletions composer.json
Original file line number Diff line number Diff line change
@@ -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",
Expand All @@ -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": {
Expand All @@ -40,7 +48,7 @@
"extra": {
"laravel": {
"providers": [
"RenokiCo\\:package_namespace\\:package_service_provider"
"RenokiCo\\LaravelD1\\LaravelD1ServiceProvider"
]
}
}
Expand Down
Empty file removed config/.gitkeep
Empty file.
Empty file removed database/migrations/.gitkeep
Empty file.
28 changes: 28 additions & 0 deletions src/LaravelD1ServiceProvider.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?php

namespace RenokiCo\LaravelD1;

use Illuminate\Support\ServiceProvider;

class LaravelD1ServiceProvider extends ServiceProvider
{
/**
* Boot the service provider.
*
* @return void
*/
public function boot()
{
//
}

/**
* Register the service provider.
*
* @return void
*/
public function register()
{
//
}
}
34 changes: 0 additions & 34 deletions src/PackageServiceProvider.php

This file was deleted.

2 changes: 1 addition & 1 deletion tests/Models/User.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RenokiCo\:package_namespace\Test\Models;
namespace RenokiCo\LaravelD1\Test\Models;

use Illuminate\Foundation\Auth\User as Authenticatable;

Expand Down
2 changes: 1 addition & 1 deletion tests/TestCase.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

namespace RenokiCo\:package_namespace\Test;
namespace RenokiCo\LaravelD1\Test;

use Orchestra\Testbench\TestCase as Orchestra;

Expand Down
2 changes: 1 addition & 1 deletion tests/database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use Illuminate\Support\Str;

$factory->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',
Expand Down

0 comments on commit 3a6be19

Please sign in to comment.