AliTalib

Experience

450

0 Best Reply Awards

  • Member Since 6 Months Ago
  • 2 Lessons Completed
  • 0 Favorites

13th October, 2018

AliTalib left a reply on How Can I Use Lian-yue/vue-upload-component In Laravel • 1 day ago

@D9705996

i delete it from my editor

AliTalib left a reply on How Can I Use Lian-yue/vue-upload-component In Laravel • 1 day ago

@D9705996

Yes I tried it but it did not work, please apply it to my code if you can

AliTalib started a new conversation How Can I Use Lian-yue/vue-upload-component In Laravel • 1 day ago

hi there i need example for use this plugin in laravel and vue.js to uplooad one file and one image on two to two input files and three text input

this my form

<form @submit.prevent="upload" class="ui form card w-100" method="POST" action="" enctype="multipart/form-data" > Upload file File <input type="file" name="file" @change="upload_file"> File Poster <input type="file" name="poster" @change="upload_poster"> File Type programs games applications videos

            <div class="field">
                <select v-model="form.tag" class="ui fluid search dropdown" required>
                    <option value="">tag</option>
                    <option value="pc">windows</option>
                    <option value="mac">mac</option>
                    <option value="linux">linux</option>
                </select>
            </div>
        </div>
        <div class="field">
            <textarea rows="4" v-model="form.description" placeholder="description" required></textarea>
        </div>
    </div>
    <div class="extra content center aligned">
        <button type="submit" class="ui right labeled icon primary button"><i class="upload icon"></i>Upload file</button>
    </div>
</form>

and this my script

export default { name: "Upload",
    data() {
        return {
            form: new Form ({
                id: '',
                title: '',
                file: '',
                poster: '',
                category: '',
                tag: '',
                description: '',
            })
        }
    },


    // you can fetch anything bat he is require created method
    methods: {

        upload() {
            this.$Progress.start();

            this.form.post('api/upload')
                .then(() => {

                    this.$Progress.finish();
                })
                .catch(() => {

                    this.$Progress.fail()
                })
        },
    // upload image if worked 
        upload_poster: function (images) {
            let file = images.target.files[0];
            console.log(file);
            let reader = new FileReader();
            if (file['size'] < 2111775 & file['type'] == ['image/jpeg'] || file['type'] == ['image/jpg'] || file['type'] == ['image/png'] || file['type'] == ['image/gif']) {
                reader.onloadend = (file) => {
                    this.form.poster = reader.result;
                };
                reader.readAsDataURL(file);
            }else {
                swal({
                    type: 'error',
                    title: 'something wrong',
                    html:
                        '<p>Image size must be less than 2 MB</p>' +
                        '<p>[jpg, jpeg, png, gif] and be extinction</p>',
                })
            }
        },
    // i need here to upload file using lian-yue/vue-upload-component
        upload_file: function (files) {

    }else {
                swal({
                    type: 'error',
                    title: 'something wrong',
                    html:
                        '<p>File size must be less than 200 GB</p>' +
                        '<p>[ zip , rar , apk , ipk ] and be extinction</p>',
                })
            }
        },
    }
}

14th September, 2018

AliTalib left a reply on How To Foreach This Data • 1 month ago

thanks @Leandro_Haruki @erikverbeek @cmdobueno

Your comments improved code and made work faster

AliTalib left a reply on How To Foreach This Data • 1 month ago

AliTalib left a reply on How To Foreach This Data • 1 month ago

                        @foreach($genres as $genre)

                            <?php $splitGenres = explode(",", $genre->genre);?>

                            @for ($i = 0; $i < count($splitGenres); $i++)

                                <?php $thisGenre = trim($splitGenres[$i], " "); ?>

                                @if (!in_array($thisGenre, $trackedGenres))

                                    <?php $trackedGenres[] = $thisGenre; ?>

                                    <a href="{{ url('cinema/movies/genre/'.$thisGenre) }}" class="item">{{ $thisGenre }}</a>

                                @endif

                            @endforeach 

                        @endforeach

AliTalib left a reply on How To Foreach This Data • 1 month ago

this is success code

@foreach($genres as $genre) @for ($i = 0; $i < count($splitGenres); $i++) @if (!in_array($thisGenre, $trackedGenres)) {{ $thisGenre }} @endif @endfor @endforeach

AliTalib left a reply on How To Foreach This Data • 1 month ago

@Leandro_Haruki

Can you give me an example using Laravel

AliTalib left a reply on How To Foreach This Data • 1 month ago

@Leandro_Haruki

I asked this question because I have other tables similar to this table, but I want to learn the idea until I modify those tables

AliTalib started a new conversation How To Foreach This Data • 1 month ago

The extraction values are separate and non-duplicated [img]https://i.imgur.com/QxnS67l.png[/img]

When it is extracted it is like this [img]https://i.imgur.com/QF1PrIk.png[/img]

I want to be like that [img]https://i.imgur.com/lDbz9sl.png[/img]

Please apply to this example [code] @foreach($genres as $genre) {{ $genre->genre }} @endforeach [/code]

30th July, 2018

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@Cronix Thank you

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@Cronix I will do that, I did not understand his intention I am Arabic, my English is not good :)

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@cmdobueno

I do not mean the price, I mean I need a technique similar to Pusher working without Internet connection, the link I sent it does not work

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@Cronix You are a good person, I thank you, but unfortunately I did not find a solution to my question.

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@Cronix I have done what you say but I do not find anything to benefit from, the annoying in Pusher is not free and requires that you be connected to the Internet until it works

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@Cronix The first link did not get out of it in a certain way just a general explanation, The second link is useful but not free

Is there a course, video or explanation of Socket.io in Laravel and how to apply it to Posts and Comments

AliTalib left a reply on RealTime Posts & Comments In Laravel • 2 months ago

@crnkovic Yes, I know this library but how do I use it in Larval, I want to explain it,   How to merge them with LARFL, do you have some links or video for it

AliTalib started a new conversation RealTime Posts & Comments In Laravel • 2 months ago

I want a way to work realtime in Laravel and I do not want to use Pusher and View posts and comments dynamically

(i want create blog , not chat)

Edit Your Profile
Update

Want to change your profile photo? We pull from gravatar.com.