Download the PHP package laravel-plus/extension without Composer
On this page you can find all versions of the php package laravel-plus/extension. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download laravel-plus/extension
More information about laravel-plus/extension
Files in laravel-plus/extension
Package extension
Short Description Laravel Extension Pack
License MIT
Homepage https://laravel.tokyo
Informations about the package extension
Laravel Extension Pack
日本語ドキュメント - Japanese
Features
-
Additional version-based migration features
- It adopted a semantic version based database migration library. Laravel Versionia has been included.
- Migration & seed class, have been incorporated into the directory structure of Laravel 5.
- You can now specify a group to migration.
- Now the name is attached to the seed.
- Designation of the version, in the class
App/Providers/DatabaseServiceProvider
. - You can use as is the migration & seed class of Laravel.
-
Additional add-on features
- It is a package feature in the application. You can use the image to replicate the directory structure of Laravel 5.
- By default, it will be placed under the 'addons' directory.
- You can make one have its own name space (PSR-4) to add-on.
- It can serve as a package of Laravel 5. Valid namespace notation
{addon-name}::
can be used 'lang', 'view'. Also can use 'config'. - Only additional add-on to copy the directory. You do not need to add code to the configuration file, such as 'config/app.php'.
- 7 types of stationery and offers two types of sample. Can be generated by artisan command
php artisan make:addon
.
-
Commands of file generation
- The class of Laravel 5 that can be generated from the command line, such as Console command, Job, Provider, ...
- The generator command can also be used a customized stub file.
- Compliance with Laravel 5 command of
make:xxx
. Command names and options are the same. - In
--addon
option, you can also generate a file in the add-on.
- Solution of a facade problem in the namespace
- A facade can be used in the class with a name space under the app directory. (A backslash and a use declaration, unnecessary)
- A facade can also be handled by the same description method from the inside in add-on name space.
How to install
[A] The Laravel project which is already included is downloaded.
[B] It's installed in a project of existence.
1. Add the package laravel-plus/extension
use Composer.
Use composer.
2. Add/Remove the service provider.
Edit file config/app.php
.
- Add
LaravelPlus\Extension\ServiceProvider::class
inproviders
section. - Remove line includes
Illuminate\Foundation\Providers\ConsoleSupportServiceProvider::class
inproviders
section.
Check for running
Add-on wiki
is made as a example.
Please confirm the routing setting.
A local server is started and accesses http://localhost:8000/addons/wiki
by a browser.
When a package name is indicated, it's success.
Commands
database:status
Migration, seed's definition and installation state are indicated.
database:upgrade
up()
method in migration of all groups, it's carried out and it's made a newest version.
It's possible to make them seed after my gray-tion.
database:clean
down()
method in migration of all groups, , it's carried out and it's returned in the clean state.
database:refresh
Re-run migration of all groups.
After database:clean
and database:upgrade
were carried out, same.
It's possible to make them seed after migration.
database:rollback
The version of the specified group is returned one.
When --all
option is put, everything's version of the designation group is eliminated.
database:again
A newest version of a specified group is made.
I have the same effect as the time when database:rollback <group>
and database:upgrade
were carried out.
It's possible to make them seed after migration.
database:seed
Run specified seed.
When omitting <seed>
, run default seed.
addon:status
Can check the status of addons.
When addons
directory and config/addon.php
file don't exist, it's made.
addon:name
A file in the add-on is scanned and the PHP namespace is changed.
When you'd like to confirm the scanned file, please designate -v
option.
addon:remove
An add-on is eliminated.
addons/blog
A directory is just eliminated.
make:addon
An add-on is made.
I add on the next command blog
is generated as PHP name spatial Blog
using a form of ui
-type.
A skeleton can be chosen from 9 kinds.
- minimum - Minimum structure.
- simple - The simple structure with the directory views and the file route.php.
- library - The composition to which a PHP range and a database are offered.
- api - The structure for API.
- ui - Full-set including UI.
- debug - The add-on in which program testing facility is put. Service provider registration of 'debug-bar' is also included.
- generator - Customized for stub files.
- laravel5 - The directory structure of Laravel 5.
- sample:ui - Example of a UI add-on.
- sample:auth - The authentication sample included in Laravel 5.
When not designating a form by a command argument, it can be chosen by an interactive mode.
PHP namespace can designate --namespace
by an option.
Please use \\
or /
for a namespace separate.
make:console
Generate a class of artisan command.
If you specify foo
to name, to generate a file app/Console/Commands/Foo.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Commands/Foo.php
.
make:controller
Generate a class of controller.
If you specify FooController
to name, to generate a file app/Http/Controllers/FooController.php
.
If you specify option --resource
, to generate a resource controller.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Controllers/FooController.php
.
make:event
Generate a class of event.
If you specify FooEvent
to name, to generate a file app/Events/FooEvent.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Events/FooEvent.php
.
make:job
Generate a class of job.
If you specify a FooJob
to name, to generate a file app/Jobs/FooEvent.php
.
If you specify option --queued
, to generate a job class implemented ShouldQueue
interface.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Jobs/FooJob.php
.
If using a App/Commands
directory of Laravel 5.0, app/Commands/FooCommand.php
can also be generated.
make:listener
Generate a class of listener.
If you specify FooListener
to name, to generate a file app/Listeners/FooListener.php
.
Require --event
option.
If you specify option --queued
, to generate a job class implemented ShouldQueue
interface.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Listeners/FooListener.php
.
make:middleware
Generate a class of middleware.
If you specify foo
to name, to generate a file app/Http/Middleware/Foo.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Middleware/Foo.php
.
make:migration
Generate a class of migration.
If you specify foo
to name, to generate a file app/Database/Migrations/App_1_0.php
.
If you specify materials
to option --create
, to generate a migration class for create materials table.
If you specify materials
to option --update
, to generate a migration class for update materials table.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Migrations/Blog_1_0.php
.
make:model
Generate a class of Eloquent model.
If you specify foo
to name, to generate a file app/Foo.php
related to foos table.
If you specify services/models/foo
to name, to generate a file app/Services/Models/Foo.php
related to foos table.
PHP namespace will be App\Services\Models
.
If you specify App_1_1
to option --migration
, also generates together migration file.
This is the same as a result of executing the command php artisan make:migration App_1_1 --create=foos
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Foo.php
.
make:policy
Generate a class of policy.
If you specify foo
to name, to generate a file app/Policies/Foo.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Policies/Foo.php
.
make:provider
Generate a class of service provider.
If you specify FooServiceProvider
to name, to generate a file app/Providers/FooServiceProvider.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Providers/FooServiceProvider.php
.
make:request
Generate a class of form request.
If you specify FooRequest
to name, to generate a file app/Http/Requests/FooRequest.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Requests/FooRequest.php
.
make:seeder
Generate a class of seeder.
If you specify staging
to name, to generate a file app/Database/Seeds/Staging.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/classes/Seeds/Staging.php
.
make:test
Generate a class of PHPUnit test suite.
If you specify FooTests
to name, to generate a file tests/FooTests.php
.
If you specify blog
to option --addon
, to generate a file addons/blog/tests/FooTests.php
.
Helper functions
addon($name = null)
Get the add-on by name.
If omit the name, it returns the add-on that contains the calling class.
This is equivalent to a addon(addon_name())
.
object retrieved by the addon()
function, you can access the add-on attributes and resources.
addon_name($class)
Get the add-on name from the class name . The class name must be a fully qualified name that contains the name space. Get the add-on by name.
If you omit the argument, returns the name of the add-on contains the caller of the class.
Facade expansion
Facade of Laravel converts the static method call of class to an instance method invocation, and has been achieved by creating an alias for the facade class in the global namespace.
For Laravel 5 alias loader does not act only in the global name space , to handle the facade from the name space (such as App
) it must put \
to the class name prefix.
Or a use declaration is used.
Laravel Extension has the alias loader which settles a facade in the namespace in the add-on bottom, so a way of Laravel 4.2 formula document mentioning can be used just as it is.
Bootstrap behavior
- Require
files
entry in fileaddons/{addon-name}/addon.json
. - Sees
namespace
entry in fileaddons/{addon-name}/addon.php
and establishes class automatic threading based on PSR-4 agreement to all directories specified asdirectories
.
Author
古川 文生 / Fumio Furukawa ([email protected])
License
MIT
All versions of extension with dependencies
laravel/framework Version ^5.5
jumilla/laravel-versionia Version ^2.0
jumilla/laravel-addomnipot Version ^2.0
jumilla/laravel-source-generator Version ^1.3