Skip to content

fooino/skeleton

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Skeleton kit for laravel package development

foo is your owner name(account name)
bar is your repository name
your package address will be foo/bar

1- composer.json

  1. Replace All fooino with foo
  2. Relpace All Fooino with Foo
  3. Replace All skeleton with bar
  4. Replace All Skelton with Bar
  5. The default license type is proprietary. If you change it to MIT, change the content of LICENSE.md as well
  6. Change the authors
  7. I added a private package(fooino/core) to the require section. If you do not have any dependancy, remove the require and repositories sections
  8. For laravel package development you will need the orchestra/testbench package

Your composer json will be:

{
    "name": "foo/bar",
    "description": "The foo bar package with tools and functionalities.",
    "type": "library",
    "license": "proprietary",
    "authors": [
        {
            "name": "Your Name",
            "email": "yourname@mail.com",
            "role": "owner"
        }
    ],
    "require-dev": {
        "orchestra/testbench": "^10.4"
    },
    "autoload": {
        "psr-4": {
            "Foo\\Bar\\": "src/",
            "Foo\\Bar\\Database\\": "database/",
            "Foo\\Bar\\Database\\Factories\\": "database/factories/"
        }
    },
    "autoload-dev": {
        "psr-4": {
            "Foo\\Bar\\Tests\\": "tests/"
        }
    },
    "extra": {
        "laravel": {
            "providers": [
                "Foo\\Bar\\Providers\\BarServiceProvider"
            ]
        }
    }
}

2- LICENSE.md

  1. Remove or Replace my name(Sajad Sholi)
  2. Remove or Replace my website(fooino.com)
  3. Remove or Replace my mail(sajadsholi@outlook.com)
  4. If you prefer the MIT license use below content
MIT License

Copyright (c) [year] [fullname]

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

3- src/Providers/SkeletonServiceProvider.php

  1. Rename the file to BarServiceProvider.php
  2. Replace All fooino with foo
  3. Relpace All Fooino with Foo
  4. Replace All skeleton with bar
  5. Replace All Skelton with Bar
  6. Remove the methods that you do not need
  7. Modify the methods base on your requirements
  8. Learn more about methods at laravelpackage.com

3- tests/TestCase.php , tests/Unit/ExampleUnitTest.php , tests/Feature/ExampleFeatureTest.php

  1. Relpace All Fooino with Foo
  2. Replace All Skelton with Bar

4- README.md

  1. Change or Remove the README.md file base on your desire

🚀 Test The files with vendor/bin/phpunit command the result must be OK (2 tests, 2 assertions)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages