Download the PHP package joshcadman01/laracasts-generators without Composer

On this page you can find all versions of the php package joshcadman01/laracasts-generators. 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 laracasts-generators

Extended Migration Generators for Laravel 6, 7, 8 and 9

Easily define the migration schema right in your make:migration command. The new commands this package provides are:

Which allows you to do php artisan make:migration:schema create_dogs_table --schema="name:string:nullable, description:text, age:integer, email:string:unique" and get a full migration that you can run using php artisan migrate. For simple cases like this one, no need to tinker inside the migration file itself. And if you do need to change anything, it's easier because the bulk of the code has already been generated.

Created in 2015 by Jeffrey Way as a natural progression of his JeffreyWay/Laravel-4-Generators package, to provide the same features for Laravel 5. Since 2017 it's been maintained by the Backpack for Laravel team, with features and fixes added by community members like you. So feel free to pitch in.

https://user-images.githubusercontent.com/1032474/92732702-cd8b3700-f344-11ea-8e3b-ae86501d66fe.gif

Table of Contents

Versions

Depending on your Laravel version, you should:

Installation

You can install v2 of this project using composer, the service provider will be automatically loaded by Laravel itself:

You're all set. Run php artisan from the console, and you'll see the new commands in the make:* namespace section.

Examples

Migrations With Schema

Notice the format that we use, when declaring any applicable schema: a comma-separated list...

So any of these will do:

Using the schema from earlier...

...this will give you:

When generating migrations with schema, the name of your migration (like, "create_users_table") matters. We use it to figure out what you're trying to accomplish. In this case, we began with the "create" keyword, which signals that we want to create a new table.

Alternatively, we can use the "remove" or "add" keywords, and the generated boilerplate will adapt, as needed. Let's create a migration to remove a column.

Now, notice that we're using the correct Schema methods.

Here's a few other examples of commands that you might write:

Models

Now, when you create a migration, you typically want a model to go with it, right? By default, this package won't create a model to go with the migration. But it could. Just specify --model=true and it will do that for you:

Migration Path

If you wish to specify a different path for your migration file, you can use the --path option like so:

Foreign Constraints

There's also a secret bit of sugar for when you need to generate foreign constraints. Imagine that you have a posts table, where each post belongs to a user. Let's try:

Notice that "foreign" option (user_id:unsignedInteger:foreign)? That's special. It signals that user_id should receive a foreign constraint. Following conventions, this will give us:

As such, for that full command, our schema should look like so:

Neato.

Pivot Tables

So you need a migration to setup a pivot table in your database? Easy. We can scaffold the whole class with a single command.

Here we pass, in any order, the names of the two tables that we need a joining/pivot table for. This will give you:

Notice that the naming conventions are being followed here, regardless of what order you pass the table names.


All versions of laracasts-generators with dependencies

PHP Build Version
Package Version
Requires illuminate/support Version ~6.0|~7.0|~8.0|~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 joshcadman01/laracasts-generators contains the following files

Loading the files please wait ....