GithubHelp home page GithubHelp logo

laravel-spark's Introduction

Spark-based Laravel installation

Since laravel/spark is not free anymore and cannot be installed or updated with composer, you can use this basic installation of Laravel 5.2 with all Spark code integrated in it.

Releases

The version numbering follows Laravel releases.

License

The Laravel framework is open-sourced software licensed under the MIT license.

laravel-spark's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

laravel-spark's Issues

Help needed in make custom module in kiosk

We are new to Laravel Spark, we are trying to add custom module in kiosk
so we want one form in that module,we are following steps of below link
https://spark.laravel.com/docs/2.0/forms

We are define our vue component for form in our ROOT_DIR/resources/assets/js/app.js
by adding below code:

Vue.component('formexample', {
data() {
return {
form: new SparkForm({
level_name: '',
level_status: ''
})
};
}
});

view file is : ROOT_DIR/resources/views/vendor/spark/kiosk/adm-levels.blade.php

Level Name
    <div class="col-md-6">
        <input type="level_name" class="form-control" name="level_name" v-model="formexample.level_name" autofocus>

        <span class="help-block" v-show="formexample.errors.has('level_name')">
            @{{ formexample.errors.get('level_name') }}
        </span>
    </div>
</div>
<div class="form-group" :class="{'has-error': formexample.errors.has('level_status')}">
    <label class="col-md-4 control-label">Status</label>

    <div class="col-md-6">
        <div class="radio">
            <label>
               <input type="radio" value="active" v-model="formexample.level_status">&nbsp;&nbsp;Active
            </label>
        </div>
        <div class="radio">
           <label>
                <input type="radio" value="inactive" v-model="formexample.level_status">&nbsp;&nbsp;Inactive
          </label>
        </div>
        <span class="help-block" v-show="formexample.errors.has('level_status')">
            @{{ formexample.errors.get('level_status') }}
        </span>
    </div>
</div>
<div class="form-group">
        <div class="col-md-6 col-md-offset-4">
            <button class="btn btn-primary" @click.prevent="level_add" :disabled="formexample.busy">
                <span v-if="formexample.busy">
                    <i class="fa fa-btn fa-spinner fa-spin"></i>Adding
                </span>

                <span v-else>
                    <i class="fa fa-btn fa-check-circle"></i>Add
                </span>
            </button>
        </div>
    </div>

After set the view file we add method to our vue component in app.js(ROOT_DIR/resources/assets/js/app.js) file:
new Vue(require('laravel-spark'));
Vue.component('formexample', {
data() {
return {
form: new SparkForm({
level_name: '',
level_status: ''
})
};
},
methods: {
register() {
Spark.post('/formexample', this.form)
.then(response => {
console.log(response);
});
}
}
});

After Doing above steps we run gulp command and complie our js successfully.
Here is gulp command snnipet for your reference:

root@vivek-pc:/opt/lampp/htdocs/onlinetutorial# gulp
[18:48:21] Using gulpfile /opt/lampp/htdocs/onlinetutorial/gulpfile.js
[18:48:21] Starting 'default'...
[18:48:21] Starting 'less'...

Fetching Less Source Files...

  • resources/assets/less/app.less

Saving To...

  • public/css/app.css

[18:48:22] Finished 'default' after 981 ms
[18:48:23] gulp-notify: [Laravel Elixir] Less Compiled!
[18:48:23] Finished 'less' after 2.7 s
[18:48:23] Starting 'browserify'...

Fetching Browserify Source Files...

  • resources/assets/js/app.js

Saving To...

  • public/js/app.js

[18:48:34] gulp-notify: [Laravel Elixir] Browserify Compiled!
[18:48:34] Finished 'browserify' after 11 s
[18:48:34] Starting 'copy'...

Fetching Copy Source Files...

  • node_modules/sweetalert/dist/sweetalert.min.js

Saving To...

  • public/js/sweetalert.min.js

[18:48:34] Finished 'copy' after 9.96 ms
[18:48:34] Starting 'copy'...

Fetching Copy Source Files...

  • node_modules/sweetalert/dist/sweetalert.css

Saving To...

  • public/css/sweetalert.css

[18:48:34] Finished 'copy' after 8.58 ms

Errors we are getting after following above steps:
1)[Vue warn]: Error when evaluating expression "formexample.busy": TypeError: scope.formexample is undefined (found in component: )
2)[Vue warn]: Error when evaluating expression "{'has-error': formexample.errors.has('level_name')}": TypeError: scope.formexample is undefined (found in component: )
3)[Vue warn]: Error when evaluating expression "formexample.errors.has('level_name')": TypeError: scope.formexample is undefined (found in component: )
4)[Vue warn]: Error when evaluating expression "formexample.errors.get('level_name')": TypeError: scope.formexample is undefined (found in component: )
5)[Vue warn]: Error when evaluating expression "{'has-error': formexample.errors.has('level_status')}": TypeError: scope.formexample is undefined (found in component: )
6)[Vue warn]: Error when evaluating expression "formexample.errors.has('level_status')": TypeError: scope.formexample is undefined (found in component: )

So our question is .we are follow the steps in wrong way ?? please suggest right way.

Also guide us for validation of forms and insert stuff into the database
Thankx in advance
Here is our files for your reference.
Reference files : files.zip

Laravel Spark Customization in kiosk panel issue

We are New to Laravel Spark,We want to do Customization in Laravel Kiosk panel and we are trying to add one custom module called “Level Management” with very basic fields.

Below are the steps we have followed to create this module.

  1. We created a new view file in \resources\views\vendor\spark\kiosk\levels.blade.php
  2. Defined new component at \resources\assets\js\components\kiosk\levels.js
Vue.component('levels', {
    /*
     **Initial state of the component's data.**
     */
    data: function () {
                        return {
            form: {
                **level_name: '', level_status: '', errors: [], adding: false**
            },
        };
    },
    methods: {
       /*
         **Initialize the registration process.**
         */
                      add: function(e) {
            var self = this;
            e.preventDefault();
            this.form.errors = [];
            this.form.adding = true;
            return this.addLevels();
        },
        /*
         **After obtaining the Stripe token, send the registration to Spark.**
               */
             addLevels: function() {
            this.$http.post('/addlevels', this.form)
                        .success(function(response) {
                    window.location = '/';
                })
                .error(function(errors) {
                    this.form.adding = false;
                    Spark.setErrorsOnForm(this.form, errors);
                });
        },
    }
});
  1. Loaded new component at /resources/assets/js/components/bootstrap.js
/*
|--------------------------------------------------------------------------

| Laravel Spark Components

|--------------------------------------------------------------------------
|
| Here we will load the Spark components which makes up the core client
| application. This is also a convenient spot for you to load all of
| your components that you write while building your applications.
*/
require('./../spark-components/bootstrap');
require('./home');
require('./kiosk/levels');
require('./settings/profile/update-contact-information'); 
  1. Than we ran gulp command on forge server and we got Blank screen in result. So we reverted app.js file on server as it looks like something is going in wrong that with the process we are doing.

We kindly request you to please help us for adding any custom module to spark and please free to suggest if we have missed any steps or we are doing in different way.

CallsInteractions for reset user password

If we want to enforce new user password validation something different with createUsersWith, and then registering in SparkServiceProvider. Is there a way to set the same rules for the Reset password?

We have spark install on laravel 5.6 and overriding rules() on ResetPasswordController is not working!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.