Download the PHP package prwlr/laravue without Composer

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

Laravue

This is a Laravel template I use for my own projects.

How is it different from a clean Laravel installation ?

The most important change is that it removes all of Laravel Mix configuration and adds new webpack config files. I tried using Laravel Mix for some projects but it just didn't feel right. I didn't like how everything was configured, it took way too long to compile sometimes and I just felt like I had no control.

I took the new configuration files from the vue-webpack template and integrated them with Laravel. The workflow feels very nice and fast now.

I also rewrote all the views (even the ones generated by the Auth command) in Vue. The blade templates only define a mount point that maps automatically to a Vue component of the same name defined in the resources/assets/js/pages folder. I will explain more about this in a section below.

At the end there is a lot going on and it's really opinionated, but you can see all of the configuration files and change them if you need to. Or maybe you could just give it a try as it is and tell me what you think!

How can I start a project using this ?

It's really easy to get up and running. Just follow these steps:

  1. Start a project by running composer create-project --prefer-dist prwlr/laravue project-name.
  2. Go into your project directory and run yarn or npm install to install all dependencies.
  3. In your .env file there is a line that reads APP_URL=http://localhost. Change that variable to whatever your application url is. This is important for development since paths to assets will be constructed using this url. For example for the homestead default url it would look like APP_URL=http://homestead.app. If you app is running in a specific port just put it as it is, for example if your app is running on localhost at port 8000, just put APP_URL=http://localhost:8000.
  4. Now you may run yarn dev or npm run dev to start working on your project.

The command will try to open a browser automatically pointing to your project's url. Sometimes it won't be able to, for example when running with vagrant, so just open it manually.

You can also use the php artisan make:auth command which I modified to generate the same pages you would expect, but showcasing some Vue components instead.

About the Libraries

I'll try to list everything that has been included in the template.

What tasks can I use ?

I'll just copy most of the descriptions from the Vuejs Webpack template since this is the template I merged with Laravel. If you want to know anything else about the tasks, about the folder structure or how to change or extend anything refer to their docs.

There is a command for testing which is yarn test || npm run test, but it doesn't work for now. Still not sure how to handle testing for Vue Components using the JSX syntax. You can consider it WIP.

Configuration options

There is a folder called client_config which has some objects needed for the build and dev configurations. Most of them you don't need to worry about, but there are some that could be useful. For example you can set cssSourceMap to true to generate source maps in development. Is not activated by default because relative paths are "buggy" (A more detailed explanation can be found in a comment in the file). To know more about the options refer to the vuejs-templates webpack docs.

In the .env file you can also set a the DEV_POLLING to TRUE in order to enable polling in the webpack dev config. This is useful when running the project with Homestead for example.

You can also change the DEV_PORT variable in order to change the port in which express will be running (Express is used along with webpack to serve the assets).

Notes

Laravel adds some useful stuff to a global Javascript variable called Laravel. I added some more stuff to it like the error bag and the old inputs. There is an utils folder where I created a file called laravel that just pulls in the global variable and exports it. Then in my Vue components I can import it to make calls to that variable a little bit cleaner.

If a view has an specific requirement for a php variable or something that it could get from Laravel, I have created some little blade files that I put in the resources/views/injectors folder that serve that purpose. They just add a script that attaches the new value to the Laravel global variable. You can then include this injector in the view that should use it. You can check some examples in the views that come by default or in the views generated by the Auth command.

Since I'm using Vue to handle all the content of the views, I've defined a new category of components called page components. You can find them in the resources/assets/js/pages folder. These components are used as the main entry points. There is a convention for connecting pages with views. All page components are created using folders with names written in Pascal Case and map automatically to a mount point or div with an id of the same value as the name of the folder but written in Kebab Case. For example resources/assets/js/pages/ExampleTest/index.js will mount automatically inside <div id="example-test"></div>.

So, anything else ?

Not really. I'd just want to thank you for giving it a try or at least reading through. If you have any feedback it'd be greatly appreciated. I bet a lot of things could be improved and I'm open to discussion, so open an issue, send a pull request or message me to [email protected].


All versions of laravue with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.4
laravel/framework Version 5.4.*
laravel/tinker Version ~1.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 prwlr/laravue contains the following files

Loading the files please wait ....