AliTalib

AliTalib

Member Since 8 Months Ago

Experience Points 1,250
Experience
Level
Lessons Completed 10
Lessons
Completed
Best Reply Awards 0
Best Answer
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.

13 Oct
1 month ago

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

@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

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>',
                })
            }
        },
    }
}
14 Sep
2 months ago

AliTalib left a reply on How To Foreach This Data

thanks @Leandro_Haruki @erikverbeek @cmdobueno

Your comments improved code and made work faster

AliTalib left a reply on How To Foreach This Data

                        @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

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

@Leandro_Haruki

Can you give me an example using Laravel

AliTalib left a reply on How To Foreach This Data

@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

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]

30 Jul
4 months ago

AliTalib left a reply on RealTime Posts & Comments In Laravel

@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

@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

@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

@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

@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

@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

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)