Download the PHP package ayup-creative/laravel-stub-maker without Composer
On this page you can find all versions of the php package ayup-creative/laravel-stub-maker. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ayup-creative/laravel-stub-maker
More information about ayup-creative/laravel-stub-maker
Files in ayup-creative/laravel-stub-maker
Package laravel-stub-maker
Short Description Quickly and easily add the ability to output stubbed content from Artisan commands
License
Informations about the package laravel-stub-maker
Laravel Stub Maker
Overview
Laravel Stub Maker is a simple, powerful package for programmatically generating PHP class and interface stubs with an intuitive API.
Installation
Basic Usage
Creating a Stub
Using as a string from the above example would output the FQN of the class being created.
Calling the method would return PHP that can then be written to a file.
Key Features
- Automatic Namespace Extraction: The method intelligently sets the namespace
- String Casting: Convert stub to its Fully Qualified Name
- Output Generation: Easily generate complete PHP file contents
Advanced Configuration
Key Methods
: Create a new stub
: Define an interface
: Set parent class or interface
: Add implemented interfaces
: Set the file output location
: Define class constructor
: Generate the PHP file
Adding A Constructor
When generating class objects, you can easily define a constructor and it arguments using the and objects respectively.
The example below could be used to add a constructor, which defines a protected property type hinted to an Eloquent Model with a private scope.
You can also define simple arguments by passing a simple string value as part of the argument.
License
This project is open-sourced software licensed under the MIT license.
Contributing
Contributions are welcome! Feel free to submit a Pull Request.
Contact
For support or inquiries, please open an issue on the GitHub repository.