Skip to content

Commit 7a1ffa4

Browse files
committed
init
1 parent 29ad661 commit 7a1ffa4

17 files changed

+79
-89
lines changed

CHANGELOG.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
# Changelog
22

3-
All notable changes to `:package_name` will be documented in this file.
3+
All notable changes to `laravel-sqlite-optimize` will be documented in this file.

LICENSE.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) :vendor_name <author@domain.com>
3+
Copyright (c) AHOI <arnebr@gmail.com>
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

+15-24
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,15 @@
1-
# :package_description
2-
3-
[![Latest Version on Packagist](https://img.shields.io/packagist/v/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
4-
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3Arun-tests+branch%3Amain)
5-
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/:vendor_slug/:package_slug/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/:vendor_slug/:package_slug/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6-
[![Total Downloads](https://img.shields.io/packagist/dt/:vendor_slug/:package_slug.svg?style=flat-square)](https://packagist.org/packages/:vendor_slug/:package_slug)
7-
<!--delete-->
8-
---
9-
This repo can be used to scaffold a Laravel package. Follow these steps to get started:
10-
11-
1. Press the "Use this template" button at the top of this repo to create a new repo with the contents of this skeleton.
12-
2. Run "php ./configure.php" to run a script that will replace all placeholders throughout all the files.
13-
3. Have fun creating your package.
14-
4. If you need help creating a package, consider picking up our <a href="https://laravelpackage.training">Laravel Package Training</a> video course.
15-
---
16-
<!--/delete-->
1+
# Optimizing SQLite in Laravel
2+
3+
[![Latest Version on Packagist](https://img.shields.io/packagist/v/ahoicloud/laravel-sqlite-optimize.svg?style=flat-square)](https://packagist.org/packages/ahoicloud/laravel-sqlite-optimize)
4+
[![GitHub Tests Action Status](https://img.shields.io/github/actions/workflow/status/ahoicloud/laravel-sqlite-optimize/run-tests.yml?branch=main&label=tests&style=flat-square)](https://github.com/ahoicloud/laravel-sqlite-optimize/actions?query=workflow%3Arun-tests+branch%3Amain)
5+
[![GitHub Code Style Action Status](https://img.shields.io/github/actions/workflow/status/ahoicloud/laravel-sqlite-optimize/fix-php-code-style-issues.yml?branch=main&label=code%20style&style=flat-square)](https://github.com/ahoicloud/laravel-sqlite-optimize/actions?query=workflow%3A"Fix+PHP+code+style+issues"+branch%3Amain)
6+
[![Total Downloads](https://img.shields.io/packagist/dt/ahoicloud/laravel-sqlite-optimize.svg?style=flat-square)](https://packagist.org/packages/ahoicloud/laravel-sqlite-optimize)
7+
178
This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
189

1910
## Support us
2011

21-
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/:package_name.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/:package_name)
12+
[<img src="https://github-ads.s3.eu-central-1.amazonaws.com/laravel-sqlite-optimize.jpg?t=1" width="419px" />](https://spatie.be/github-ad-click/laravel-sqlite-optimize)
2213

2314
We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).
2415

@@ -29,20 +20,20 @@ We highly appreciate you sending us a postcard from your hometown, mentioning wh
2920
You can install the package via composer:
3021

3122
```bash
32-
composer require :vendor_slug/:package_slug
23+
composer require ahoicloud/laravel-sqlite-optimize
3324
```
3425

3526
You can publish and run the migrations with:
3627

3728
```bash
38-
php artisan vendor:publish --tag=":package_slug-migrations"
29+
php artisan vendor:publish --tag="laravel-sqlite-optimize-migrations"
3930
php artisan migrate
4031
```
4132

4233
You can publish the config file with:
4334

4435
```bash
45-
php artisan vendor:publish --tag=":package_slug-config"
36+
php artisan vendor:publish --tag="laravel-sqlite-optimize-config"
4637
```
4738

4839
This is the contents of the published config file:
@@ -55,14 +46,14 @@ return [
5546
Optionally, you can publish the views using
5647

5748
```bash
58-
php artisan vendor:publish --tag=":package_slug-views"
49+
php artisan vendor:publish --tag="laravel-sqlite-optimize-views"
5950
```
6051

6152
## Usage
6253

6354
```php
64-
$variable = new VendorName\Skeleton();
65-
echo $variable->echoPhrase('Hello, VendorName!');
55+
$sqliteOptimize = new AHOI\SqliteOptimize();
56+
echo $sqliteOptimize->echoPhrase('Hello, AHOI!');
6657
```
6758

6859
## Testing
@@ -85,7 +76,7 @@ Please review [our security policy](../../security/policy) on how to report secu
8576

8677
## Credits
8778

88-
- [:author_name](https://github.com/:author_username)
79+
- [Arne Breitsprecher](https://github.com/arnebr)
8980
- [All Contributors](../../contributors)
9081

9182
## License

composer.json

+15-16
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
{
2-
"name": ":vendor_slug/:package_slug",
3-
"description": ":package_description",
2+
"name": "ahoicloud/laravel-sqlite-optimize",
3+
"description": "Optimizing SQLite in Laravel",
44
"keywords": [
5-
":vendor_name",
5+
"AHOI",
66
"laravel",
7-
":package_slug"
7+
"laravel-sqlite-optimize"
88
],
9-
"homepage": "https://github.com/:vendor_slug/:package_slug",
9+
"homepage": "https://github.com/ahoicloud/laravel-sqlite-optimize",
1010
"license": "MIT",
1111
"authors": [
1212
{
13-
"name": ":author_name",
14-
"email": "author@domain.com",
13+
"name": "Arne Breitsprecher",
14+
"email": "arnebr@gmail.com",
1515
"role": "Developer"
1616
}
1717
],
@@ -30,24 +30,23 @@
3030
"pestphp/pest-plugin-laravel": "^2.3",
3131
"phpstan/extension-installer": "^1.3",
3232
"phpstan/phpstan-deprecation-rules": "^1.1",
33-
"phpstan/phpstan-phpunit": "^1.3",
34-
"spatie/laravel-ray": "^1.35"
33+
"phpstan/phpstan-phpunit": "^1.3"
3534
},
3635
"autoload": {
3736
"psr-4": {
38-
"VendorName\\Skeleton\\": "src/",
39-
"VendorName\\Skeleton\\Database\\Factories\\": "database/factories/"
37+
"AHOI\\SqliteOptimize\\": "src/",
38+
"AHOI\\SqliteOptimize\\Database\\Factories\\": "database/factories/"
4039
}
4140
},
4241
"autoload-dev": {
4342
"psr-4": {
44-
"VendorName\\Skeleton\\Tests\\": "tests/",
43+
"AHOI\\SqliteOptimize\\Tests\\": "tests/",
4544
"Workbench\\App\\": "workbench/app/"
4645
}
4746
},
4847
"scripts": {
4948
"post-autoload-dump": "@composer run prepare",
50-
"clear": "@php vendor/bin/testbench package:purge-skeleton --ansi",
49+
"clear": "@php vendor/bin/testbench package:purge-laravel-sqlite-optimize --ansi",
5150
"prepare": "@php vendor/bin/testbench package:discover --ansi",
5251
"build": [
5352
"@composer run prepare",
@@ -73,13 +72,13 @@
7372
"extra": {
7473
"laravel": {
7574
"providers": [
76-
"VendorName\\Skeleton\\SkeletonServiceProvider"
75+
"AHOI\\SqliteOptimize\\SqliteOptimizeServiceProvider"
7776
],
7877
"aliases": {
79-
"Skeleton": "VendorName\\Skeleton\\Facades\\Skeleton"
78+
"SqliteOptimize": "AHOI\\SqliteOptimize\\Facades\\SqliteOptimize"
8079
}
8180
}
8281
},
8382
"minimum-stability": "dev",
8483
"prefer-stable": true
85-
}
84+
}

config/skeleton.php

-6
This file was deleted.

config/sqlite-optimize.php

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?php
2+
3+
// config for AHOI/SqliteOptimize
4+
return [
5+
6+
];

database/factories/ModelFactory.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?php
22

3-
namespace VendorName\Skeleton\Database\Factories;
3+
namespace AHOI\SqliteOptimize\Database\Factories;
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
66

database/migrations/create_skeleton_table.php.stub database/migrations/create_sqlite_optimize_table.php.stub

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ return new class extends Migration
88
{
99
public function up()
1010
{
11-
Schema::create('migration_table_name_table', function (Blueprint $table) {
11+
Schema::create('laravel_sqlite_optimize_table', function (Blueprint $table) {
1212
$table->id();
1313

1414
// add fields

phpunit.xml.dist

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
backupStaticProperties="false"
1717
>
1818
<testsuites>
19-
<testsuite name="VendorName Test Suite">
19+
<testsuite name="AHOI Test Suite">
2020
<directory>tests</directory>
2121
</testsuite>
2222
</testsuites>

src/Commands/SkeletonCommand.php src/Commands/SqliteOptimizeCommand.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace VendorName\Skeleton\Commands;
3+
namespace AHOI\SqliteOptimize\Commands;
44

55
use Illuminate\Console\Command;
66

7-
class SkeletonCommand extends Command
7+
class SqliteOptimizeCommand extends Command
88
{
9-
public $signature = 'skeleton';
9+
public $signature = 'laravel-sqlite-optimize';
1010

1111
public $description = 'My command';
1212

src/Facades/Skeleton.php

-16
This file was deleted.

src/Facades/SqliteOptimize.php

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<?php
2+
3+
namespace AHOI\SqliteOptimize\Facades;
4+
5+
use Illuminate\Support\Facades\Facade;
6+
7+
/**
8+
* @see \AHOI\SqliteOptimize\SqliteOptimize
9+
*/
10+
class SqliteOptimize extends Facade
11+
{
12+
protected static function getFacadeAccessor(): string
13+
{
14+
return \AHOI\SqliteOptimize\SqliteOptimize::class;
15+
}
16+
}

src/Skeleton.php

-7
This file was deleted.

src/SqliteOptimize.php

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<?php
2+
3+
namespace AHOI\SqliteOptimize;
4+
5+
class SqliteOptimize
6+
{
7+
}
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?php
22

3-
namespace VendorName\Skeleton;
3+
namespace AHOI\SqliteOptimize;
44

55
use Spatie\LaravelPackageTools\Package;
66
use Spatie\LaravelPackageTools\PackageServiceProvider;
7-
use VendorName\Skeleton\Commands\SkeletonCommand;
7+
use AHOI\SqliteOptimize\Commands\SqliteOptimizeCommand;
88

9-
class SkeletonServiceProvider extends PackageServiceProvider
9+
class SqliteOptimizeServiceProvider extends PackageServiceProvider
1010
{
1111
public function configurePackage(Package $package): void
1212
{
@@ -16,10 +16,10 @@ public function configurePackage(Package $package): void
1616
* More info: https://github.com/spatie/laravel-package-tools
1717
*/
1818
$package
19-
->name('skeleton')
19+
->name('laravel-sqlite-optimize')
2020
->hasConfigFile()
2121
->hasViews()
22-
->hasMigration('create_skeleton_table')
23-
->hasCommand(SkeletonCommand::class);
22+
->hasMigration('create_laravel-sqlite-optimize_table')
23+
->hasCommand(SqliteOptimizeCommand::class);
2424
}
2525
}

tests/Pest.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<?php
22

3-
use VendorName\Skeleton\Tests\TestCase;
3+
use AHOI\SqliteOptimize\Tests\TestCase;
44

55
uses(TestCase::class)->in(__DIR__);

tests/TestCase.php

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
<?php
22

3-
namespace VendorName\Skeleton\Tests;
3+
namespace AHOI\SqliteOptimize\Tests;
44

55
use Illuminate\Database\Eloquent\Factories\Factory;
66
use Orchestra\Testbench\TestCase as Orchestra;
7-
use VendorName\Skeleton\SkeletonServiceProvider;
7+
use AHOI\SqliteOptimize\SqliteOptimizeServiceProvider;
88

99
class TestCase extends Orchestra
1010
{
@@ -13,14 +13,14 @@ protected function setUp(): void
1313
parent::setUp();
1414

1515
Factory::guessFactoryNamesUsing(
16-
fn (string $modelName) => 'VendorName\\Skeleton\\Database\\Factories\\'.class_basename($modelName).'Factory'
16+
fn (string $modelName) => 'AHOI\\SqliteOptimize\\Database\\Factories\\'.class_basename($modelName).'Factory'
1717
);
1818
}
1919

2020
protected function getPackageProviders($app)
2121
{
2222
return [
23-
SkeletonServiceProvider::class,
23+
SqliteOptimizeServiceProvider::class,
2424
];
2525
}
2626

@@ -29,7 +29,7 @@ public function getEnvironmentSetUp($app)
2929
config()->set('database.default', 'testing');
3030

3131
/*
32-
$migration = include __DIR__.'/../database/migrations/create_skeleton_table.php.stub';
32+
$migration = include __DIR__.'/../database/migrations/create_laravel-sqlite-optimize_table.php.stub';
3333
$migration->up();
3434
*/
3535
}

0 commit comments

Comments
 (0)