gidaban79

gidaban79

Member Since 2 Years Ago

leeds

Experience Points 7,840
Experience Level 2

2,160 experience to go until the next level!

In case you were wondering, you earn Laracasts experience when you:

  • Complete a lesson — 100pts
  • Create a forum thread — 50pts
  • Reply to a thread — 10pts
  • Leave a reply that is liked — 50pts
  • Receive a "Best Reply" award — 500pts
Lessons Completed 55
Lessons
Completed
Best Reply Awards 0
Best Reply
Awards
  • Start Your Engines Achievement

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • First Thousand Achievement

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • One Year Member Achievement

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • Two Year Member Achievement

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • Three Year Member Achievement

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • Four Year Member Achievement

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • Five Year Member Achievement

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • School In Session Achievement

    School In Session

    Earned when at least one Laracasts series has been fully completed.

  • Welcome To The Community Achievement

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • Full Time Learner Achievement

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • Pay It Forward Achievement

    Pay It Forward

    Earned once you receive your first "Best Reply" award on the Laracasts forum.

  • Subscriber Achievement

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • Lifer Achievement

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • Laracasts Evangelist Achievement

    Laracasts Evangelist

    Earned if you share a link to Laracasts on social media. Please email [email protected] with your username and post URL to be awarded this badge.

  • Chatty Cathy Achievement

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • Laracasts Veteran Achievement

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • Ten Thousand Strong Achievement

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • Laracasts Master Achievement

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • Laracasts Tutor Achievement

    Laracasts Tutor

    Earned once your "Best Reply" award count is 100 or more.

  • Laracasts Sensei Achievement

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • Top 50 Achievement

    Top 50

    Earned once your experience points ranks in the top 50 of all Laracasts users.

16 Mar
4 days ago

gidaban79 left a reply on Tracking Visitors Of Specific Url

I want to show statistic for my business customers, for example how many visit they had, today, yesterday, last week and etc, one specific user.

14 Mar
6 days ago

gidaban79 started a new conversation Tracking Visitors Of Specific Url

Hello guys, i am looking for some package of tracking users which visit specific url on my website, it will be statistic for business customers,ex how many clicks today, last week, last month, I don`t mind analystic by google

03 Mar
2 weeks ago

gidaban79 left a reply on JQuery - Disable A Text Field In Form

Okay problem solved :) thanks i just add 'data-field' attribute and working well thanks again :)

gidaban79 left a reply on JQuery - Disable A Text Field In Form

Sorry for refreshing it is work, however my checkbox is also disabled and i can`t click for uncheck

gidaban79 left a reply on JQuery - Disable A Text Field In Form

@CRONIX - thanks for advice :)

02 Mar
2 weeks ago

gidaban79 started a new conversation JQuery - Disable A Text Field In Form

Hello guys,

i want to make form with opening hours, but customer can click on checkbox and in this day will be closed also text filed should be disabled,

html:

                 <div class="row">
                        <div class="col-md-6">
                            {!! Form::label('monday', 'Monday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="monday" name="monday" type="checkbox">
                                <label class="custom-control-label" for="monday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('monday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('tuesday', 'Tuesday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="tuesday" name="tuesday"
                                       type="checkbox">
                                <label class="custom-control-label" for="tuesday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('tuesday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('wednesday', 'Wednesday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="wednesday" name="wednesday"
                                       type="checkbox">
                                <label class="custom-control-label" for="wednesday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('wednesday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('thursday', 'Thursday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="thursday" name="thursday"
                                       type="checkbox">
                                <label class="custom-control-label" for="thursday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('thursday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('friday', 'Friday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="friday" name="friday" type="checkbox">
                                <label class="custom-control-label" for="friday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('friday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}

                        </div>
                        <div class="col-md-6">
                            {!! Form::label('saturday', 'Saturday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="saturday" name="saturday"
                                       type="checkbox">
                                <label class="custom-control-label" for="saturday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('saturday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('sunday', 'Sunday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="sunday" name="sunday" type="checkbox">
                                <label class="custom-control-label" for="sunday">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('sunday',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}
                            {!! Form::label('bank', 'Bank Holiday', ['class' => 'control-label']) !!}
                            <div class="custom-control custom-checkbox pull-right">
                                <input class="custom-control-input is_close" id="bank" name="bank" type="checkbox">
                                <label class="custom-control-label" for="bank">
                                    <span>Close ?</span>
                                </label>
                            </div>
                            {!! Form::text('bank',null, ['class' => 'form-control input-mask','data-mask'=>'00-00','placeholder'=>'8-18']) !!}

                        </div>
                    </div>

I am use laravel collective, for generate forms,

js:

            $('input:checkbox.is_close').on('click', function () {
                let click = this.id;
                if ($('input:checkbox.is_close').is(':checked')) {
                   
                } else {
                   
                }

            });

in click variable is name of day, which should disable proper text field;

25 Feb
3 weeks ago

gidaban79 left a reply on Where Are You All From?

Leeds UK here :)

24 Feb
3 weeks ago

gidaban79 left a reply on Best Way For Store Data In Database?

sorry formatting :)

i want to use polymorphic relationships to assign branch to companies.

then something like that user->profile->company->branches()

one company have a many branches, should be a morphToMany ?

gidaban79 left a reply on Best Way For Store Data In Database?

Sorry for refreshing subject

@snapey yeah your solution is best, however is possible to make more levels relationship ?

example: -user --Customer --Company ---Branch ?

19 Feb
1 month ago

gidaban79 left a reply on Best Way For Store Data In Database?

Okay i have one more question about polymorphic relationships.

In my case one specific company type can have more like one branch then it should add more like one record,

then will be morphToMany ? but how allow it ?

for example if company is as retailer ?

gidaban79 left a reply on Best Way For Store Data In Database?

@snapey your idea looking interesting, then basically separate data for customers and companies,

18 Feb
1 month ago

gidaban79 left a reply on Best Way For Store Data In Database?

Yes i use laratrust for roles and it working well,

for example customers don`t have to fill fields like VAT number or website.

Some data re similar like localization.

gidaban79 started a new conversation Best Way For Store Data In Database?

Hello Guys, i am working now on one website where users - customers have to fill some data, but when account is other type ex installer i need to fill them other data.

And now my question,

Keep it all users in one table? even they have to fill different data?

Make a another table for store non customers data?

07 Feb
1 month ago
03 Feb
1 month ago

gidaban79 left a reply on How To Show Message After Verify Email ?

How about something more dynamically?

Session::flash ? is possible to do ?

gidaban79 started a new conversation How To Show Message After Verify Email ?

Hello guys :)

i wish to display message when user will click on link in verification email,

After click, redirect on website and show message "Thanks" :)

02 Feb
1 month ago

gidaban79 started a new conversation Redirect After Login User If Don`t Fill Some Data ?

Hello guys, i want to make in my app redirect to specific URL if user don't fill some data in his/her profile.

Somebody tried something like that ?

27 Jan
1 month ago

gidaban79 started a new conversation Vue And Rating System

Hello guys in beautiful Sunday:)

let start from code :)

my vue component:

<template>
    <div class="container px-0 mt-4">
        <div class="row align-items-center">
            <div id="review" class="col-12 card mt-4 pt-3">
                <div class="row">
                    <div class="col-12">
                        <div class="col-7 mb-3"><span><strong>Reviews</strong></span></div>
                        <a class="small mr-3 ml-3">Sort by</a>
                        <!-- Small dropdown -->
                        <div class="dropdown">
                            <button class="btn btn-sm btn-outline-primary dropdown-toggle" type="button"
                                    data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"> Newest first
                            </button>
                            <div class="dropdown-menu dropdown-menu-sm" aria-labelledby="dropdown_small"><a
                                    class="dropdown-item" href="#">Oldest first</a> <a class="dropdown-item" href="#">Rating
                                (High to low)</a> <a class="dropdown-item" href="#">Rating (Low to high)</a></div>
                        </div>
                        <!--Paginate-->
                        <nav aria-label="Page navigation example">
                            <ul class="pagination justify-content-center">
                                <li v-bind:class="[{disabled: !pagination.prev_page_url}]" class="page-item"><a
                                        @click.prevent="fetchReviews(pagination.prev_page_url)" class="page-link"
                                        href="">Previous</a></li>
                                <li class="page-item disabled"><a href="#" class="page-link text-dark">Page {{
                                    pagination.current_page}}
                                    of {{ pagination.last_page}}</a></li>
                                <li v-bind:class="[{disabled: !pagination.next_page_url}]" class="page-item"><a
                                        @click.prevent="fetchReviews(pagination.next_page_url)" class="page-link"
                                        href="">Next</a></li>
                            </ul>
                        </nav>
                        <!--Paginate-->
                        <!--loop-->
                        <div class="media mt-4 ml-3" v-for="review in reviews" v-bind:key="review.id">
                            <img class="mr-3 rounded" src="https://lorempixel.com/64/64/people/?81158"
                                 alt="reviewers-image">
                            <div class="media-body">
                                <h6 class="mt-0">{{review.first_name}} {{review.last_name}}</h6>
                                <div class="small">{{review.created_at}}</div>
                                <div class="small">{{review.body}}</div>
                            </div>
                        </div>
                        <!--loop-->
                        <!-- Review section START-->
                        <div class="container px-0 mt-4">
                            <div class="row align-items-center">
                                <div class="col-12 mt-4 pt-3 mr-0" style="background-color: #f8f8f8;">
                                    <div class="row">
                                        <div class="col-4 ml-3"><span><strong>Write your review</strong></span></div>
                                        <div class="col pr-4 pb-3 text-right"><a class="" data-toggle="collapse"
                                                                                 href="#collapseReview"
                                                                                 aria-expanded="false"
                                                                                 aria-controls="collapseReview"><i
                                                class="fas fa-caret-down"></i></a></div>
                                        <div class="collapse col-12" data-toggle="false" id="collapseReview">
                                            <!-- star rating -->
                                            <div class="col-6 star-rating">
                                                <div class="row">
                                                    <div class="rating mb-3">

                                                    </div>
                                                </div>
                                            </div>
                                            <!--star rating end -->

                                            <form @submit.prevent="saveReview">
                                                <div class="col-6">
                                                    <div class="form-group">
                                                        <input type="text" name="title" id="title"
                                                               v-model="review.title"
                                                               class="form-control form-control-sm"
                                                               placeholder="Title of your review">
                                                    </div>
                                                </div>
                                                <div class="offset-6"></div>
                                                <div class="col-9">
                                                    <div class="small mb-1"><i class="fas fa-info-circle mr-2"></i>Be
                                                        honest with your review, this will be made public.
                                                    </div>
                                                </div>
                                                <div class="col-12">
                                                    <div class="form-group">
                                                        <textarea class="form-control" name="body" id="body"
                                                                  v-model="review.body"
                                                                  placeholder="Your review - tell people about your experience"
                                                                  rows="3" resize="none"></textarea>
                                                    </div>
                                                </div>
                                                <div class="col-12 mb-3">
                                                    <input type="file" name="file-1[]" id="file"
                                                           class="custom-input-file"
                                                           data-multiple-caption="{count} files selected" multiple/>
                                                    <label for="file"> <em class="fa fa-upload"></em> <span>Choose a photo…</span>
                                                    </label>
                                                </div>
                                                <div class="row">
                                                    <div class="col ml-3"><span>Your details</span></div>
                                                </div>
                                                <div class="row">
                                                    <div class="col ml-3">
                                                        <div class="form-group">
                                                            <input type="text" id="first_name" name="first_name"
                                                                   v-model="review.first_name"
                                                                   class="form-control form-control-sm"
                                                                   placeholder="First name">
                                                        </div>
                                                    </div>
                                                    <div class="col mr-3">
                                                        <div class="form-group">
                                                            <input type="text" id="last_name" name="last_name"
                                                                   v-model="review.last_name"
                                                                   class="form-control form-control-sm"
                                                                   placeholder="Last name">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="row">
                                                    <div class="col ml-3 small">
                                                        <div class="mt-3">
                                                            <span>This email won't be shown publically</span><em
                                                                class="ml-3 fas fa-angle-right"></em></div>
                                                    </div>
                                                    <div class="col mr-3">
                                                        <div class="form-group">
                                                            <input type="text" id="email" name="email"
                                                                   v-model="review.email"
                                                                   class="form-control form-control-sm"
                                                                   placeholder="Email">
                                                        </div>
                                                    </div>
                                                </div>
                                                <div class="col-12 text-center mt-2 mb-4">
                                                    <button type="submit"
                                                            class="btn btn-sm btn-primary mt-4 mt-sm-0 shadow"><i
                                                            class="fas fa-pen-alt mr-2"></i>Submit your review
                                                    </button>
                                                </div>
                                            </form>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- Review section END-->

                        </div>
                    </div>
                </div>
            </div>
        </div>
    </div>


</template>

<script>

    export default {
        props: ['companyId', 'csrfToken'],
        name: "Reviews",
        data() {
            return {
                reviews: [],
                login: false,
                review: {
                    first_name: '',
                    last_name: '',
                    email: '',
                    title: '',
                    rate: '',
                    photo: '',
                    body: '',
                    created_at: '',
                },
                review_id: '',
                pagination: {},
            }
        },
        created() {
            this.fetchReviews();
            this.randomNumber();
        },
        methods: {
            fetchReviews(page_url) {
                let vm = this;
                page_url = page_url || '/review/' + this.companyId;
                fetch(page_url)
                    .then(res => res.json()
                    )
                    .then(res => {
                        this.reviews = res.data;
                        vm.makePagination(res);
                    })
                    .catch(err => console.log(err)
                    );

            },
            saveReview() {
                fetch('/review/' + this.companyId, {
                    method: 'post',
                    headers: {
                        'X-CSRF-TOKEN': this.csrfToken,
                        'content-type': 'application/json'
                    },
                    body: JSON.stringify(this.review),
                }).then(res => res.json())
                    .then(data => {
                        this.review.first_name = '';
                        this.review.last_name = '';
                        this.review.email = '';
                        this.review.title = '';
                        this.review.rate = '';
                        this.review.photo = '';
                        this.review.body = '';
                        this.fetchReviews()
                    })
                    .catch(err => console.log(err));
            },

            makePagination(meta) {
                let pagination = {
                    current_page: meta.current_page,
                    last_page: meta.last_page,
                    next_page_url: meta.next_page_url,
                    prev_page_url: meta.prev_page_url,

                }
                this.pagination = pagination;
            },
            randomNumber: function () {
                this.random = Math.floor(Math.random() * (10 - 1 + 1)) + 1
            }
        }
    }
</script>

<style scoped>

</style>```

so far working well but i can`t pass/get data from rating system.
I am using : https://github.com/nashio/star-rating-svg

Voting system working but how pass data from rating system after voting to vue component and save results in DB?
20 Jan
2 months ago

gidaban79 started a new conversation Vue And Paginate

Hello guys, i am trying to make a paginate in my reviews system,

<script>
    var companyId = 1;
    export default {
        name: "Reviews",
        data() {
            return {
                reviews: [],
                login: false,
                review: {
                    id: '',
                    first_name: '',
                    last_name: '',
                    title: '',
                    rate: '',
                    photo: '',
                    body: '',
                    created_at: '',
                    company_id: '',
                },
                review_id: '',
                pagination: {},
            }
        },
        created() {
            this.fetchReviews();
            this.randomNumber();
        },
        methods:{
            fetchReviews(page_url) {
                let vm = this;
                page_url = page_url || '/review/'+companyId+'/';
                    fetch(page_url)
                        .then(res => res.json()
                        )
                        .then(res => {
                            this.reviews = res.data;
                            vm.makePagination(res);
                        })
                        .catch(err => console.log(err)
                        );

            },
            makePagination(meta) {
                let pagination = {
                    current_page: meta.current_page,
                    last_page: meta.last_page,
                    next_page_url: meta.next_page_url,
                    prev_page_url: meta.prev_page_url,

                }
                this.pagination = pagination;
            },
            randomNumber: function () {
                this.random = Math.floor(Math.random() * (10 - 1 + 1)) + 1
            }
        }
    }
</script>

for paginate i am using

                        <!--Paginate-->
                        <nav aria-label="Page navigation example">
                            <ul class="pagination justify-content-center">
                                <li v-bind:class="[{disabled: !pagination.prev_page_url}]" class="page-item"><a
                                        @click="fetchComments(pagination.prev_page_url)" class="page-link" href="#">Previous</a></li>
                                <li class="page-item disabled"><a href="#" class="page-link text-dark">Page {{ pagination.current_page}}
                                    of {{ pagination.last_page}}</a></li>
                                <li v-bind:class="[{disabled: !pagination.next_page_url}]" class="page-item"><a
                                        @click="fetchComments(pagination.next_page_url)" class="page-link" href="#">Next</a></li>
                            </ul>
                        </nav>
                        <!--Paginate-->

when i am click on next page in console i see it:

 Property or method "fetchComments" is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property.
12 Jan
2 months ago

gidaban79 left a reply on Best Way For Exchange Data ?

@sergiu17

Yes that will be reviews - comments, part of application. Then that is all what i want to know thanks :)

gidaban79 started a new conversation Best Way For Exchange Data ?

Hello Guys :)

just wondering about best way for exchanging data (receive and send) between vue component and application ? use normal routes or like api?

02 Jan
2 months ago

gidaban79 left a reply on Featured Posts, Companies? Idea For Store?

@BENCARTER78 - Okay maybe i said something wrong, sorry.

But not always created_at will be equal with starting date. That why i have from and to fields.

01 Jan
2 months ago

gidaban79 left a reply on Font Awesome As Npm Package Any Suggestion ?

Problem solved :)

import {library, dom} from '@fortawesome/fontawesome-svg-core';
import {faCaretUp} from '@fortawesome/free-solid-svg-icons';
import {faCaretDown} from '@fortawesome/free-solid-svg-icons';
import {faStar} from '@fortawesome/free-solid-svg-icons';
import {faCheck} from '@fortawesome/free-solid-svg-icons';

library.add([faCaretDown, faCaretUp, faCheck, faStar]);

dom.watch();
{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "axios": "^0.18",
        "bootstrap": "^4.0.0",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^4.0.7",
        "lodash": "^4.17.5",
        "popper.js": "^1.12",
        "resolve-url-loader": "^2.3.1",
        "sass": "^1.15.2",
        "sass-loader": "^7.1.0",
        "vue": "^2.5.17",
        "vue-template-compiler": "^2.5.21"
    },
    "dependencies": {
        "@fortawesome/fontawesome-free": "^5.6.3",
        "@fortawesome/fontawesome-svg-core": "^1.2.12",
        "@fortawesome/free-solid-svg-icons": "^5.6.3"
    }
}

gidaban79 started a new conversation Font Awesome As Npm Package Any Suggestion ?

Hello guys,

First Happy new Year :)

next :P

i have problem with import of font awesome as npm package;

import fontawesome from '@fortawesome/fontawesome-free';
import faCaretUp from '@fortawesome/free-solid-svg-icons/faCaretUp';
import faCaretDown from '@fortawesome/free-solid-svg-icons/faCaretDown';
import faStar from '@fortawesome/free-solid-svg-icons/faStar';
import faCheck from '@fortawesome/free-solid-svg-icons/faCheck';

fontawesome.library.add(faCaretUp,faCaretDown,faStar,faCheck);

and in console i get error

app.js:50294 Uncaught TypeError: Cannot read property 'add' of undefined
    at Module../resources/js/fontawesome.js (app.js:50294)
    at __webpack_require__ (app.js:20)
    at Object../resources/js/app.js (app.js:50117)
    at __webpack_require__ (app.js:20)
    at Object.0 (app.js:50316)
    at __webpack_require__ (app.js:20)
    at app.js:84
    at app.js:87

my package.json file

{
    "private": true,
    "scripts": {
        "dev": "npm run development",
        "development": "cross-env NODE_ENV=development node_modules/webpack/bin/webpack.js --progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js",
        "watch": "npm run development -- --watch",
        "watch-poll": "npm run watch -- --watch-poll",
        "hot": "cross-env NODE_ENV=development node_modules/webpack-dev-server/bin/webpack-dev-server.js --inline --hot --config=node_modules/laravel-mix/setup/webpack.config.js",
        "prod": "npm run production",
        "production": "cross-env NODE_ENV=production node_modules/webpack/bin/webpack.js --no-progress --hide-modules --config=node_modules/laravel-mix/setup/webpack.config.js"
    },
    "devDependencies": {
        "axios": "^0.18",
        "bootstrap": "^4.0.0",
        "cross-env": "^5.1",
        "jquery": "^3.2",
        "laravel-mix": "^4.0.7",
        "lodash": "^4.17.5",
        "popper.js": "^1.12",
        "resolve-url-loader": "^2.3.1",
        "sass": "^1.15.2",
        "sass-loader": "^7.1.0",
        "vue": "^2.5.17",
        "vue-template-compiler": "^2.5.21"
    },
    "dependencies": {
        "@fortawesome/fontawesome-free": "^5.6.3",
        "@fortawesome/free-solid-svg-icons": "^5.6.3"
    }
}
31 Dec
2 months ago

gidaban79 left a reply on Comment System In Vue And Laravel ?

@jlrdw it is package someone tested it ?

@erlesand what i need,

add Comment, Edit comment only by author or admin, Like comment, Rapport comment.

I am don`t looking for already code, can be some tutorial always something new to do :)

30 Dec
2 months ago

gidaban79 started a new conversation Comment System In Vue And Laravel ?

Hello guys,

Someone tried to build a comment system with Vue and Laravel ?

gidaban79 left a reply on Featured Posts, Companies? Idea For Store?

Right, but also i need keep something like history? Each customer should have possibility to check all previous featured times.

gidaban79 started a new conversation Featured Posts, Companies? Idea For Store?

I am looking for idea how to proper store in database featured companies in listings or something similar.

Store only one feature time in one table? with dates from to?

        Schema::create('company_features', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('company_id');
            $table->boolean('is_featured')->default(0);
            $table->timestamp('featured_from')->nullable();
            $table->timestamp('featured_to')->nullable();
            $table->timestamps();
            $table->foreign('company_id')->references('id')->on('companies')->onDelete('cascade');
        });

however i need also store like history of featured times. Make another table for it?

13 Nov
4 months ago

gidaban79 started a new conversation Form Requests

Hello Guys,

i wonder about use it my project for store and update methods,

then i have to make two different Form requests?

One for store and second for update?

in both case i have to check unique name of category

'name' => [
                'required',
                'min:3',
                'max:190',
                Rule::unique('company_categories', 'name')->ignore($id)]

if i will use in controller working fine how about form requests?

in store i don't have id of record.

08 Sep
6 months ago

gidaban79 left a reply on Validate Rules When You Want To Edit Post?

How about poster ?

i tried "sometimes|image" even is empty i got error poster should be an image file

gidaban79 started a new conversation Validate Rules When You Want To Edit Post?

Hello guys,

at the beginning i would like to as about best way for validate date before put to database but only when i want to edit post.

i have fields 'title' 'body' 'poster'

$this->validate($request->all(),
[
        'title' => 'required|unique:blogs|max:190',
                'description' => 'required',
                'poster' => 'required|image|max:51200'
] );

that is simple validation when i add post

how should looks validation rules in update post ?

07 Sep
6 months ago

gidaban79 left a reply on How To Turn Off Auto Login Users ? In Laravel 5.7

@bestmomo

Yes @OriOn explain how to overwrite in REGISTER function, not in login process.

Thanks :)

gidaban79 left a reply on How To Turn Off Auto Login Users ? In Laravel 5.7

Hello guys,

i really have to turn off auto login after register or verify email.

User should login by him self.

Its is my question.

gidaban79 left a reply on How To Turn Off Auto Login Users ? In Laravel 5.7

@shez1983 @Cronix Where you can find remember me in register form ?

gidaban79 started a new conversation How To Turn Off Auto Login Users ? In Laravel 5.7

Hello guys,

i really have to turn off auto login after register or verify email.

User should login by him self.

25 Aug
6 months ago

gidaban79 started a new conversation ACL Including Access For Controllers

Hello guys :)

Someone tried to make a ACL based on database?

What i mean, in ZEND framework you can build something like that. In database are stored information :

Controller, action, access level;

for example in one controller users have to access for show action but not for create or store action.

14 Aug
7 months ago

gidaban79 left a reply on How To Use Package From Vendor Directory

yeah that is just html but for example how to link css or js files?

gidaban79 started a new conversation How To Use Package From Vendor Directory

hello guys.

i just add package to my project "almasaeed2010/adminlte" im sure everyone know what it is :)

and now how i can use it in my project?

i have to move all files form "dist" directory to public directory ?

08 Jul
8 months ago

gidaban79 left a reply on How To Return Generated Password After Create New User.

@Cronix Yeah i know that, but i have signed by them what they want, and they understand it. Even is really not safe.

gidaban79 left a reply on How To Return Generated Password After Create New User.

that will be just really rare time, my customer want to sent password via email.

@Cronix Good solutions for future, thanks

gidaban79 started a new conversation How To Return Generated Password After Create New User.

Hello guys,

Hope are you well?

What i do?

In my admin panel i want to add new users. It works fine, but also i want to send email with login "[email protected]" user with automatically generated password. But after insert all data do database password is already hashed.

my function:

protected function createUser(array $data)
    {
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt(str_random(10))
        ]);
    }

and function for store data:

    public function store(Request $request)
    {
        $this->validator($request->all())->validate();

        $user = $this->createUser($request->all());
        Mail::to($user->email)->send(new adminAddNewUser($user));
    }

All data are pass after insert to database, is any method for get a unhashed password? Just for remind account is created by admin.

15 Jun
9 months ago

gidaban79 left a reply on Dropzone.js How To Hide Progress Bar Of Uploaded Files?

i'm trying upload images to gallery.

i don't need a total progress bar but for each files. if files will be upload successfully progress bar should be hidden. After upload files on server i have my files, but still is active a progress bar of file which has been uploaded.

gidaban79 left a reply on Dropzone.js How To Hide Progress Bar Of Uploaded Files?

I really don't have problems with total upload progress bar, but with each file.

gidaban79 left a reply on Dropzone.js How To Hide Progress Bar Of Uploaded Files?

i added

        myDropzone.on("queuecomplete", function (progress) {
            document.querySelector("#total-progress").style.opacity = "0";
            console.log(1);
        });

and yes after upload in console i see '1'.

gidaban79 started a new conversation Dropzone.js How To Hide Progress Bar Of Uploaded Files?

Hello guys,

on beginning i want to say this script is really awesome :)

i want to integrate with Laravel, working fine, function return true or error, but if my function return true progress bar of uploaded files is still visible.

var previewNode = document.querySelector("#template");
        previewNode.id = "";
        var previewTemplate = previewNode.parentNode.innerHTML;
        previewNode.parentNode.removeChild(previewNode);

        var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone
            url: "/admins/gallery/upload", // Set the url
            headers: {
                'x-csrf-token': document.querySelectorAll('meta[name=csrf-token]')[0].getAttributeNode('content').value,
            },
            thumbnailWidth: 220,
            parallelUploads: 20,
            previewTemplate: previewTemplate,
            autoQueue: false,
            previewsContainer: "#previews",
            clickable: ".fileinput-button"
        });

        myDropzone.on("addedfile", function(file) {
            // Hookup the start button
            file.previewElement.querySelector(".start").onclick = function() { myDropzone.enqueueFile(file); };
        });

        myDropzone.on("totaluploadprogress", function(progress) {
            document.querySelector("#total-progress .progress-bar").style.width = progress + "%";
        });

        myDropzone.on("sending", function(file) {
            document.querySelector("#total-progress").style.opacity = "1";
            file.previewElement.querySelector(".start").setAttribute("disabled", "disabled");
        });

        myDropzone.on("queuecomplete", function(progress) {
            document.querySelector("#total-progress").style.opacity = "0";
        });

        document.querySelector("#actions .start").onclick = function() {
            myDropzone.enqueueFiles(myDropzone.getFilesWithStatus(Dropzone.ADDED));
        };
        document.querySelector("#actions .cancel").onclick = function() {
            myDropzone.removeAllFiles(true);
        };

php function

        $image = $request->file('file');
        $imageName = md5(uniqid(rand(), true) . $image) . '.' . $image->getClientOriginalExtension();
        $upload_success = $image->move(public_path('images'),$imageName);

        if ($upload_success) {
            return response()->json(true, 200);
        }
        // Else, return error 400
        else {
            return response()->json('error', 400);
        }

template html

            <div id="actions" class="row">

                <div class="col-md-7">
                    <!-- The fileinput-button span is used to style the file input field as button -->
                    <span class="btn btn-flat btn-success fileinput-button dz-clickable">
                <i class="glyphicon glyphicon-plus"></i>
                <span>Add files...</span>
                        </span>
                    <button type="submit" class="btn btn-flat btn-primary start">
                        <i class="glyphicon glyphicon-upload"></i>
                        <span>Start upload</span>
                    </button>
                    <button type="reset" class="btn btn-flat btn-warning cancel">
                        <i class="glyphicon glyphicon-ban-circle"></i>
                        <span>Cancel upload</span>
                    </button>
                </div>

                <div class="col-lg-5">
                   <span class="fileupload-process">
          <div id="total-progress" class="progress progress-striped active" role="progressbar" aria-valuemin="0"
               aria-valuemax="100" aria-valuenow="0">
                        <div class="progress-bar progress-bar-success" style="width:0%;"
                             data-dz-uploadprogress=""></div>
                    </div>
                    </span>
                </div>
                <div class="clearfix">&nbsp;</div>
            </div>
            <div class="row" class="files" id="previews">

                <div id="template" class="file-row col-md-3">
                    <!-- This is used as the file preview template -->
                    <div>
                        <div class="preview"><img data-dz-thumbnail class="img-thumbnail"/></div>
                    </div>
                    <div>
                        <strong class="error text-danger" data-dz-errormessage></strong>
                    </div>
                    <div>
                        <p class="size" data-dz-size></p>
                        <div class="progress progress-striped active" role="progressbar" aria-valuemin="0"
                             aria-valuemax="100" aria-valuenow="0">
                            <div class="progress-bar progress-bar-success" style="width:0%;"
                                 data-dz-uploadprogress></div>
                        </div>
                    </div>
                    <div class="text-center">
                        <button class="btn btn-flat btn-sm btn-primary start">
                            <i class="glyphicon glyphicon-upload"></i>
                            <span>Start</span>
                        </button>
                        <button data-dz-remove class="btn btn-flat btn-sm btn-warning cancel">
                            <i class="glyphicon glyphicon-ban-circle"></i>
                            <span>Cancel</span>
                        </button>
                        <button data-dz-remove class="btn btn-flat btn-sm btn-danger delete">
                            <i class="glyphicon glyphicon-trash"></i>
                            <span>Delete</span>
                        </button>
                    </div>
                </div>

            </div>
09 Jun
9 months ago

gidaban79 started a new conversation Login And Register Forms On One Page (one View File)

Hello guys.

Someone trying something similar?

2 forms in one view?

How to display errors depend from which form has been completed?