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.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-stub

Laravel Stub

laravel-stub-banner

PHP Version Require Latest Stable Version Total Downloads License Passed Tests

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 and generate 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 :) ❤️


All versions of laravel-stub with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
illuminate/support Version ^9.0|^10.0|^11.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package binafy/laravel-stub contains the following files

Loading the files please wait ....