Download the PHP package binafy/laravel-stub without Composer
On this page you can find all versions of the php package binafy/laravel-stub. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download binafy/laravel-stub
More information about binafy/laravel-stub
Files in binafy/laravel-stub
Package laravel-stub
Short Description Generate stub files easy
License MIT
Homepage https://github.com/binafy/laravel-stub
Informations about the package laravel-stub
Laravel Stub
- Introduction
- Requirements
- Installation
- Usage
- Create a stub file
- How to use Laravel Stub
from
to
name
ext
replace
replaces
moveStub
download
generate
- Contributors
- Security
- Changelog
- License
- Donate
Introduction
The Laravel-Stub package enhances the development workflow in Laravel by providing a set of customizable stubs. Stubs are templates used to scaffold code snippets for various components like models, controllers, and migrations. With Laravel-Stub, developers can easily tailor these stubs to match their project's coding standards and conventions. This package aims to streamline the code generation process, fostering consistency and efficiency in Laravel projects. Explore the customization options and boost your development speed with Laravel-Stub.
Requirements
Version/Laravel | L9 | L10 | L11 |
---|---|---|---|
1.0 | :white_check_mark: | :white_check_mark: | :white_check_mark: |
Installation
You can install the package with Composer:
You don't need to publish anything.
Usage
Create a stub file
First of all, create a stub file called model.stub
:
Add some code to that, like this:
How to use Laravel Stub
You may use Laravel Stub, you need to use the LaravelStub
facade:
from
First thing, you need to use the from
method to give the stub path:
to
So, you need to determine the destination path of the stub file:
name
You can determine the stub file but also attention don't write the stub extension:
ext
You can determine the stub extension:
replace
The replace
method takes two parameters, the first one is the key (variable) and the second one is the value. The value will be replaced with the variable:
replaces
The replaces
method takes an array. If you want to replace multiple variables you can use this method:
moveStub
By default, Laravel Stub
creates a copy from your stub file and moves it to the destination path. If you want to move the current stub file, you can use the moveStub
method:
After running this code, the model.stub
didn't exist.
download
If you want to download the stub file, you can use the download
method:
generate
The important method is generate
. To generate the stub file at the end you need to use the generate
method to generate stub file:
NOTE: Don't use the
download
andgenerate
methods in one chain.
The final file will be like this (new-model.php
):
Contributors
Thanks to all the people who contributed. Contributors.
Security
If you discover any security-related issues, please email [email protected]
instead of using the issue tracker.
Changelog
The changelog can be found in the CHANGELOG.md
file of the GitHub repository. It lists the changes, bug fixes, and improvements made to each version of the Laravel User Monitoring package.
License
The MIT License (MIT). Please see License File for more information.
Donate
If this package is helpful for you, you can buy a coffee for me :) ❤️
- Iraninan Gateway: https://daramet.com/milwad_khosravi
- Paypal Gateway: SOON
- MetaMask Address:
0xf208a562c5a93DEf8450b656c3dbc1d0a53BDE58