Download the PHP package axitbv/laravel-artisan-vue without Composer

On this page you can find all versions of the php package axitbv/laravel-artisan-vue. 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-artisan-vue

laravel-artisan-vue

Laravel Artisan Command for scaffolding a Vue.js feature application with a Vuex store, utilizing some best practices.

Installing

composer require --dev axitbv/laravel-artisan-vue

Using the command

php artisan vue:feature SomeNewFeature

Will yield:

Using the generated files

The idea here is to Code Split each Vue.js Feature App into its own bundle. This bundle is then loaded into the view that will service the feature. One view, one page specific bundle, one store, one service, one entrypoint, one container component.

  1. Make sure that the entrypoint resources/js/components/some-new-feature/index.js is built to its own bundle.

Example webpack.mix.js configuration:

  1. One your view, make sure that you load that js, after the main scripts (manifest.js, vendor.js and app.js).

If you don't have a section like that yet, modify your layout/app.blade.php. Just make sure that the app feature bundle is loaded after the other scripts.

  1. Add a div with the appropriate id, in which the feature app will boot.

  2. Optional: If you pass any data from the controller to the feature app, you can add one or more data-* attributes on the <div> tag.

You can pass any type of data to one or more data-attributes, but one of the most common examples is to pass some sort of endpoint for the app to communicate with. For example, in a Blog Editor feature app, one could pass a full path to a post like so:

And have an action call the api and retrieve the data.

Another way would be to simply get the post data from the Controller and pass it as a prop:

Or yet another way:

It's up to you.

Laravel Default Vue.js Setup Caveats

The way that Laravel ships Vue.js (with a frontend preset) assumes that would want the following to be true:

  1. You want to load Vue-components anywhere on the page
  2. You want to have any and all Vue-components you have, loaded into memory and ready to go, with each and every page request.
  3. If your Vue-components have Vuex-stores, it will be merged into one global single state tree. This means that, if you follow the load-everything-all-the-time-all-at-once method, that your Root instance will have a combined state of everything, even when a feature is not necessarily shown or used on a page.

This is achieved by having an encapsulating <div id="app"></div> in the layouts/app.blade.php file that is scaffolded by the frontend preset.

Additionally, the app.js will boot a Vue.js Root instance inside of that encapsulating <div>. The provided ExampleComponent is also loaded into memory, and there is a code snippet that can recursively load all Vue files.

If you are building large applications, with large features, that have numerous subcomponents and Vuex stores, this will become unsustainable very quickly!

What you want to achieve is the following:

The result is that you will be loading only the stuff that is required for the feature that is served by your application's view into memory. The additional benefit is that when you have multiple Vuex-enabled stores, you will not get a global single state tree: the state is confined to the Root of your feature app. Lastly, the Vue.js devtools plays very nice with multiple roots as well.

Credits

This was heavily inspired by GitLab's Front End Development Guidelines:

License

MIT


All versions of laravel-artisan-vue with dependencies

PHP Build Version
Package Version
Requires php Version ^7.1.3|^8.0
illuminate/console Version ~5.8|^6.0|^7.0|^8.0
illuminate/filesystem Version ~5.8|^6.0|^7.0|^8.0
illuminate/support Version ~5.8|^6.0|^7.0|^8.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 axitbv/laravel-artisan-vue contains the following files

Loading the files please wait ...