Iljido

Iljido

Member Since 2 Months Ago

Experience Points
1,410
Total
Experience

3,590 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
0
Lessons
Completed
Best Reply Awards
0
Best Reply
Awards
  • start your engines Created with Sketch.

    Start Your Engines

    Earned once you have completed your first Laracasts lesson.

  • first-thousand Created with Sketch.

    First Thousand

    Earned once you have earned your first 1000 experience points.

  • 1-year Created with Sketch.

    One Year Member

    Earned when you have been with Laracasts for 1 year.

  • 2-years Created with Sketch.

    Two Year Member

    Earned when you have been with Laracasts for 2 years.

  • 3-years Created with Sketch.

    Three Year Member

    Earned when you have been with Laracasts for 3 years.

  • 4-years Created with Sketch.

    Four Year Member

    Earned when you have been with Laracasts for 4 years.

  • 5-years Created with Sketch.

    Five Year Member

    Earned when you have been with Laracasts for 5 years.

  • school-in-session Created with Sketch.

    School In Session

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

  • welcome-newcomer Created with Sketch.

    Welcome To The Community

    Earned after your first post on the Laracasts forum.

  • full-time-student Created with Sketch.

    Full Time Learner

    Earned once 100 Laracasts lessons have been completed.

  • pay-it-forward Created with Sketch.

    Pay It Forward

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

  • subscriber Created with Sketch.

    Subscriber

    Earned if you are a paying Laracasts subscriber.

  • lifer Created with Sketch.

    Lifer

    Earned if you have a lifetime subscription to Laracasts.

  • evangelist Created with Sketch.

    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 Created with Sketch.

    Chatty Cathy

    Earned once you have achieved 500 forum replies.

  • lara-veteran Created with Sketch.

    Laracasts Veteran

    Earned once your experience points passes 100,000.

  • 10k-strong Created with Sketch.

    Ten Thousand Strong

    Earned once your experience points hits 10,000.

  • lara-master Created with Sketch.

    Laracasts Master

    Earned once 1000 Laracasts lessons have been completed.

  • laracasts-tutor Created with Sketch.

    Laracasts Tutor

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

  • laracasts-sensei Created with Sketch.

    Laracasts Sensei

    Earned once your experience points passes 1 million.

  • top-50 Created with Sketch.

    Top 50

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

Level 1
1,410 XP
May
22
1 week ago
Activity icon

Replied to How To Change Boolean Value From 0 To 1 In Laravel On Update.

@maaz GG ! :D put your comment as best reply

May
21
1 week ago
Activity icon

Replied to How To Change Boolean Value From 0 To 1 In Laravel On Update.

for example if u want to update table users :

Model::where('attribut', $modelVariable->Attribut)->update(['is_approved' => 1]);

make it as a form in admin.blade, when he click to approve , send it to a controller (update function) then write that code, you can pass the ID of the approved one from blade to controller , with that instead of : where('id', 1) u put where ('id',$id) with $id is the same passed from blade to controller,

Activity icon

Started a new Conversation Laravel - 2fa Authentification

hello , i have a question about google 2FA authentification, in register form you enter a phone number, and you scan with your phone and you get the code, is there a way to verifiy that the phone number entered in register form is the same that is scanning the qr code ? because right now i need to make sure that the phone number user entered is the same that he's using to scan the QR code,

kindly help please.

May
14
2 weeks ago
Activity icon

Started a new Conversation Laravel Verification Account By Sending Sms To User

hello , i'm looking for a tutorial on how i can send code verification account to a user who submitted his phone number, i wanted to try nexmo but it didn't work, is there any API that can let you send sms to users ? i'm living in algeria (africa), i still didn't found an api that support my country x_x

If there's another why to verifiy user account (exlude email please), could you please tell me about it

TY.

May
12
3 weeks ago
Activity icon

Started a new Conversation Algolia Displaying Result Of Deleted Threads/users

Hi :D is it normal that algolia still display deleted users/threads ? my database is empty but it's still displaying old data in search section

May
11
3 weeks ago
Activity icon

Replied to Adding 2FA Google Authentification To An Existing Laravel 5.5 Project

@bobbybouwmann well now it works , but i get this error when i click register :

You need to install the imagick extension to use this back end

i followed a tutorial on how to add imagick in xampp but i still get the same error

Activity icon

Replied to I Want To Cancel Mark As Best Reply When The User Click On It Again

i did this tutorial but it doesn't contain how to cancel, if u select a comment as best reply u can't undo it unless you select another comment

May
10
3 weeks ago
Activity icon

Started a new Conversation I Want To Cancel Mark As Best Reply When The User Click On It Again

hello i have a button "mark as best reply", right now when a user click on it , the panel will change to color "green", but now i want to cancel that if the user click on it again, any idea ? , here's the code : (it's the last line from template and script)

<template>
    <div :id="'reply-'+id" class="panel" :class="isBest ? 'panel-success': 'panel-default'">
        <div class="panel-heading">
            <div class="level">
                <h5 class="flex">
                    <a :href="'/profiles/' + reply.owner.name"
                        v-text="reply.owner.name">
                    </a> said <span v-text="ago"></span>
                </h5>

                <div v-if="signedIn">
                    <favorite :reply="reply"></favorite>
                </div>
            </div>
        </div>

        <div class="panel-body">
            <div v-if="editing">
                <form @submit="update">
                    <div class="form-group">
                        <label for="body">Body:</label>
                        <textarea name="body" id="body"  rows="8" class="form-control" required v-model="body"></textarea>
                    </div>

                    <button class="btn btn-xs btn-primary">Update</button>
                    <button class="btn btn-xs btn-link" @click="editing = false" type="button">Cancel</button>
                </form>
            </div>

            <div v-else v-html="body"></div>
        </div>

        <div class="panel-footer level" v-if="authorize('owns', reply) || authorize('owns', reply.thread)">
            <div v-if="authorize('owns', reply)">
                <button class="btn btn-xs mr-1" @click="editing = true" v-if="! editing">Edit</button>
                <button class="btn btn-xs btn-danger mr-1" @click="destroy" onclick="return confirm('Are you sure?')">Delete</button>
            </div>

            <button class="btn btn-xs btn-default ml-a" @click="markBestReply" v-if="authorize('owns', reply.thread)">Best Reply</button>  //AND HERE TOO
        </div>
    </div>
</template>

<script>
    import Favorite from './Favorite.vue';
    import moment from 'moment';

    export default {
        props: ['reply'],

        components: { Favorite },

        data() {
            return {
                editing: false,
                id: this.reply.id,
                body: this.reply.body,
                isBest: this.reply.isBest,


            };
        },

        computed: {
            ago() {
                return moment(this.reply.created_at).fromNow() + '...';
            }
        },

        created () {
            window.events.$on('best-reply-selected', id => {
                this.isBest = (id === this.id);
            });
        },

        methods: {
            update() {
                axios.patch(
                    '/replies/' + this.id, {
                        body: this.body
                    })
                    .catch(error => {
                        flash(error.response.data, 'danger');
                    });

                this.editing = false;

                flash('Updated!');
            },
            destroy() {
                axios.delete('/replies/' + this.id);

                this.$emit('deleted', this.id);
            },

            markBestReply() {		//HERE

                axios.post('/replies/' + this.id + '/best');

                window.events.$emit('best-reply-selected', this.id);

                }

            }
        

    }
</script>

Activity icon

Replied to Adding 2FA Google Authentification To An Existing Laravel 5.5 Project

@bobbybouwmann this time i got everything xD, when i run "composer.." , it create a folder in VENDOR , the name is : EUSBIU , it contains : laravel-spark-google2fa folder, and the problem is in Google2FAServiceProvider.php here :

<?php

namespace Eusebiu\LaravelSparkGoogle2FA;

use Illuminate\Support\Facades\Route;
use Illuminate\Support\ServiceProvider;
use Laravel\Spark\Spark;
use PragmaRX\Google2FAQRCode\Google2FA;

class Google2FAServiceProvider extends ServiceProvider
{
    /**
     * Boot the service provider.
     *
     * @return void
     */
    public function boot()
    {
        $this->loadMigrationsFrom(__DIR__.'/../migrations');

        $this->loadViewsFrom(__DIR__.'/../resources/views', 'google2fa');

        if ($this->app->runningInConsole()) {
            $this->definePublishing();
        }

        $this->defineRoutes();
    }

    /**
     * Define the publishable migrations and resources.
     *
     * @return void
     */
    protected function definePublishing()
    {
        $this->publishes([
            __DIR__.'/../resources/assets/js/enable-two-factor-auth.js' => resource_path('assets/js/spark-components/settings/security/enable-two-factor-auth.js'),
        ], 'assets');

        $this->publishes([
            __DIR__.'/../resources/views/enable-two-factor-auth.blade.php' => resource_path('views/vendor/spark/settings/security/enable-two-factor-auth.blade.php'),
        ], 'views');
    }

    /**
     * Define the routes.
     *
     * @return void
     */
    protected function defineRoutes()
    {
        if (! $this->app->routesAreCached()) {
            Route::group(['middleware' => 'web'], function () {
                Route::post('/settings/two-factor-auth-generate', TwoFactorAuthController::class.'@generate');
                Route::post('/settings/two-factor-auth-google', TwoFactorAuthController::class.'@enable2fa');
            });
        }
    }

    /**
     * Register the service provider.
     *
     * @return void
     */
    public function register()
    {
        Spark::swap('[email protected]', function ($user) {
            $user->forceFill([
                'google2fa_secret' => session()->pull('spark:twofactor:secret'),
            ])->save();

            return $user;
        });

        Spark::swap('[email protected]', function ($user) {
            $user->forceFill([
                'google2fa_secret' => null,
            ])->save();

            return $user;
        });

        Spark::swap('[email protected]', function ($user, $code) {
            return (new Google2FA)->verifyKey($user->google2fa_secret, $code);
        });
    }
}

as u can see at the top it's using laravel spark :// , i'm getting this error message :

In Google2FAServiceProvider.php line 68:

  Class 'Eusebiu\LaravelSparkGoogle2FA\Spark' not found


Script @php artisan package:discover handling the post-autoload-dump event returned with error code 1

Installation failed, reverting ./composer.json to its original content.

May
09
3 weeks ago
Activity icon

Started a new Conversation Adding 2FA Google Authentification To An Existing Laravel 5.5 Project

Hi, i want to add 2FA google authentification to my existing laravel project , could you please give me a link or something ? i tried this :

composer require pragmarx/google2fa-laravel

but it giving me error :

Class 'Laravel\Spark\Spark' not found

i read that u can't install laravel/spark on an existing project :-( , please help

(if u have other alternative i'm IN xD, i just want to verifiy user ! )

Activity icon

Replied to How To Display No Result Found ( Algolia)

@bobbybouwmann existed vue not custom one xD that's why i was confused by the doc but it was just a bunch of tags

May
08
3 weeks ago
Activity icon

Replied to How To Display Current Selected Option When Using Onchange() Function On Select Tag

@jlrdw it seems when i go to a specific link it refresh so the selected option is no longer selected, instead i get "select channel" , :/ (it shows the result but would be nice if even if i go to another page the selected option keep the same )

Activity icon

Started a new Conversation How To Display Current Selected Option When Using Onchange() Function On Select Tag

hello, in my dropdown menu, i linked the option tag to a url , it goes to the url, but the the dropdown list is showing "select channel" instead of the option selected

here's the code :

<select class="form-control" id="channel_list" name="channel_list"  onchange="location = this.value;">
                            <option value="">Select Channel</option>
                            @foreach(App\Channel::all() as $channel)
                                <option value="/threads/{{ $channel->slug }}" >
                                        {{ $channel->name }}
                                </option>
                            @endforeach
 </select>
Activity icon

Awarded Best Reply on How To Display No Result Found ( Algolia)

@bobbybouwmann thanks for reply i found a js file where they put all tags and one of them was ais-no-results

so i used it like this :

<ais-results class="form-group">
                        <template scope="{ result }">
                            <li>
                                <a :href="result.path">
                                    <ais-highlight :result="result" attribute-name="title"></ais-highlight>
                                </a>
                            </li>
                        </template>
                    </ais-results>

                    <ais-no-results>
                        <h2>No result found, better luck next time ! </h2>
                    </ais-no-results>

thanks ! :D

Activity icon

Replied to How To Display No Result Found ( Algolia)

@bobbybouwmann thanks for reply i found a js file where they put all tags and one of them was ais-no-results

so i used it like this :

<ais-results class="form-group">
                        <template scope="{ result }">
                            <li>
                                <a :href="result.path">
                                    <ais-highlight :result="result" attribute-name="title"></ais-highlight>
                                </a>
                            </li>
                        </template>
                    </ais-results>

                    <ais-no-results>
                        <h2>No result found, better luck next time ! </h2>
                    </ais-no-results>

thanks ! :D

Activity icon

Replied to How To Display No Result Found ( Algolia)

@bobbybouwmann like this ? :

<ais-results class="form-group" v-show="searchStore.query.length > 0">
                            // Show the results
                            <template scope="{ result }">
                                <li>
                                    <a :href="result.path">
                                        <ais-highlight :result="result" attribute-name="title"></ais-highlight>
                                    </a>
                                </li>
                            </template>


                        <div v-show="searchStore.query.length <= 0">

                            // Show no results text here
                            <p>wouhouu</p>

                        </div>

                    </ais-results>

in the tutorial they worked only with this file, i don't have any vue.js file :/

Activity icon

Started a new Conversation How To Display No Result Found ( Algolia)

hello i have this code to search for a thread, when there is no matching thread it display nothing, i want to display a message "no result found", but i don't know where, i read the doc and it gives directly JS code but i don't know where to put it

here's the code :

<div class="row">
            <ais-index
                app-id="{{ config('scout.algolia.id') }}"
                api-key="{{ config('scout.algolia.key') }}"
                index-name="threads"
                query="{{ request('q') }}"
            >
                <div class="col-md-8">
                    <ais-results class="form-group">
                        <template scope="{ result }">
                            <li>
                                <a :href="result.path">
                                    <ais-highlight :result="result" attribute-name="title"></ais-highlight>
                                </a>
                            </li>
                        </template>
                    </ais-results>
                </div>

                <div class="col-md-4">
                    <div class="panel panel-default">
                        <div class="panel-heading">
                            Search
                        </div>

                        <div class="panel-body">
                            <ais-search-box>
                                <ais-input placeholder="Find a thread..." :autofocus="true" class="form-control"></ais-input>
                            </ais-search-box>
                        </div>
                    </div>

(using laravel 5.5)

May
07
3 weeks ago
Activity icon

Replied to Alternative To Algolia Search In Laravel

@cwray-tech guess this is the one i'm looking for but i don't know where to put it ? they didn't specifiy where ? i only have seach.blade.php

search.addWidgets([
  instantsearch.widgets.hits({
    container: 'hits',
    templates: {
      empty: '<div>No results have been found for {{ query }}</div>.'
    }
  })
]);

Activity icon

Awarded Best Reply on Npm Run Doesn't Work When I Cloned A Project, Help Please :(

@gokulkhatiwada didn't work so i just downloaded node 8.x instead of 12 xD , thanks

Activity icon

Replied to Alternative To Algolia Search In Laravel

@cwray-tech i used laravel 5.5 instead of 7, and now it works the thing now is when there are no result match, it's empty (it doesn't show a msg or smth), do you know how i can do it ? to display message if no result

Activity icon

Replied to Npm Run Doesn't Work When I Cloned A Project, Help Please :(

@gokulkhatiwada didn't work so i just downloaded node 8.x instead of 12 xD , thanks

May
06
3 weeks ago
Activity icon

Started a new Conversation Npm Run Doesn't Work When I Cloned A Project, Help Please :(

hello i cloned this project : https://github.com/laracasts/Lets-Build-a-Forum-in-Laravel , it works in laravel 5.5, when i run "npm install", in order to change some features there i have thise error :

npm npm does not support Node.js v12.16.1
npm WARN npm You should probably upgrade to a newer version of node as we
npm WARN npm can't make any promises that npm will work with this version.
npm WARN npm Supported releases of Node.js are the latest release of 4, 6, 7, 8, 9.

thanks for reply

May
05
4 weeks ago
Activity icon

Started a new Conversation Authorize In App.js + Owns In Authorization.js Not Working, Buttons Doesn't Shows

hello , in build forum tutorial, in order to update/delete a thread, or update/delete/favorite a reply, you need to be signed if and be the owner of the thread/reply, i used an "authorize method", declared in app.js but it doesn't work at all, as a result all my buttons are not displayed even if i'm the owner of the thread/reply , here's the full code

notice : it also using vue2js

this is in app.js, authorize :

let authorizations = require('./authorization');

Vue.prototype.authorize = function (...params) {
    if (! window.app.signedIn) return false;

    if (typeof params[0] === 'string') {
        return authorizations[params[0]](params[1]);
    }

    return params[0](window.app.user);
};

Vue.prototype.signedIn = window.app.signedIn;

and this is authorization.js

let user = window.app.user;

module.exports = {
    owns (model, prop = 'user_id') {
        return ! model[prop] === user.id;
    },

};

reply.vue :

<template>
    <div :id="'reply-'+id" class="card mb-2" :class="isBest ? 'border-success': 'card-default'">
        <div class="card-header d-flex justify-content-between align-items-center">
            <div>
                <a :href="'/profiles/' + reply.owner.name" v-text="reply.owner.name">
                    said <span v-text="ago"></span>
                </a>
            </div>
            <div v-if="signedIn">
                <favorite :reply="reply"></favorite>
            </div>
        </div>

        <div class="card-body">
            <div v-if="editing">
                <div class="form-group">
                    <form @submit.prevent="update">
                        <div class="form-group">
                            <wysiwyg v-model="body"></wysiwyg>
                        </div>

                        <button class="btn btn-sm btn-primary">Update</button>
                        <button class="btn btn-sm btn-link" @click="editing = false" type="button">Cancel</button>
                    </form>
                </div>
            </div>
            <article v-html="body" v-else></article>
        </div>

        <div class="card-footer d-flex justify-content-between" v-if="authorize('owns', reply) || authorize('owns', reply.thread)">
            <div v-if="authorize('owns', reply)">
                <button class="btn btn-sm btn-success mr-1" @click="editing = true">Edit</button>
                <button class="btn btn-danger btn-sm" @click="destroy">Delete</button>
            </div>
            <button class="btn btn-sm btn-outline-primary ml-a" @click="markBestReply" v-if="authorize('owns', reply.thread)">Best Reply?</button>
        </div>
    </div>
</template>

<script>
    import Favorite from './Favorite.vue';
    import moment from 'moment';

    export default {
        props: ['reply'],
        components: {Favorite},
        data() {
            return {
                editing: false,
                id: this.reply.id,
                body: this.reply.body,
                isBest: this.reply.isBest,
            };
        },

        created() {
            window.events.$on('best-reply-selected', id => {
                this.isBest = (id === this.id);
            });
        },

        computed: {
            ago() {
                return moment(moment.utc(this.reply.created_at)).fromNow();
            },
            signedIn() {
                return window.app.signedIn;
            },

            canUpdate() {
                return this.authorize(user => this.data.user_id == user.id)
            }
        },

        methods: {
            update() {
                axios.patch(
                    '/replies/' + this.data.id, {
                        body: this.body
                    })
                    .catch(error => {
                        flash(error.response.data, 'danger');
                    });
                this.editing = false;
                flash('Updated!');
            },

            destroy() {
                axios.delete('/replies/' + this.id);

                this.$emit('deleted', this.id)
            },
            markBestReply() {
                axios.post('/replies/' + this.id + '/best');
                window.events.$emit('best-reply-selected', this.id);
            }
        }
    }
</script>

Activity icon

Replied to Alternative To Algolia Search In Laravel

@cwray-tech yes in thread i used :

class Thread extends Model
{
    use Searchable;


public function toSearchableArray()
    {
        return $this->toArray() + ['path' => $this->path()];
    }

....

also in algolia i did set up the indices

Activity icon

Replied to Alternative To Algolia Search In Laravel

@cwray-tech really ? :( (i'm the biggest noob lol)

well this code :

@extends('layouts.app')

@section('content')
    <div class="container">
        <ais-index app-id="{{ config('scout.algolia.id') }}"
                   api-key="{{ config('scout.algolia.key') }}"
                   index-name="threads"
                   query="{{ request('q') }}"
                   class="row justify-content-center">
            <div class="col-md-8">
                <ais-results>
                    <template scope="{ result }">
                        <li>
                            <a :href="result.path">
                                <ais-highlight :result="result" attribute-name="title"></ais-highlight>
                            </a>
                        </li>
                    </template>
                </ais-results>
            </div>

            <div class="col-md-4">
                <div class="card">
                    <div class="card-header">
                        Search
                    </div>

                    <div class="card-body">
                        <ais-search-box>
                            <ais-input placeholder="Find a thread..."
                                       :autofocus="true"
                                       class="form-control"></ais-input>
                        </ais-search-box>
                    </div>
                </div>

                <div class="card">
                    <div class="card-header">
                        Filter By Channel
                    </div>

                    <div class="card-body">
                        <ais-refinement-list attribute-name="channel.name"></ais-refinement-list>
                    </div>
                </div>

            </div>
        </ais-index>
    </div>
@endsection

doesn't work at all, the ais-refinement-list doesn't show the list of channel, and even a simple search doesn't work it giving me errors like ais-index not found

Activity icon

Started a new Conversation Alternative To Algolia Search In Laravel

Hi , i wanted to do a search section in my app, i followed the tutorial in let's build a forum, but it didn't work at all, my question is : is there a package/github that let me implement easily the search + search filter ? (i'm out of time, i need to quickly implement it, please)

May
04
4 weeks ago
Activity icon

Started a new Conversation How Can We Use Agnolia To Do A Multi Level Search (category - Sub Category)

Hi :D , in my app i have categories and sub categories, does anyone know where i can find a tutorial that show me how to use agnolia in order to do this kind of search in my app ? (like when a user click on a category, all its sub categories will appear, and then he can perfom a search)

thanks for reply.

May
03
4 weeks ago
Activity icon

Replied to Post With Ajax And Bootstrap Modal

in Ajax : second line -> $(dcument) should not be : $(document) ???

Activity icon

Replied to Failed Asserting That A Row In The Table [replies] Matches The Attributes, Table Is Empty

yes , in the tutorial he created a function.php that does the create/make (more like generic function where u just put the name of the model u want to create)

May
02
1 month ago
Activity icon

Started a new Conversation Failed Asserting That A Row In The Table [replies] Matches The Attributes, Table Is Empty

hello, i was doing let's build forum tut's, but one of my test is failing here :


function test_an_authenticated_user_may_participate_in_forum_threads(){

        $this->signIn();

        $thread = create('App\Thread');
        $reply = make('App\Reply');

        $this->post($thread->path() . '/replies', $reply->toArray());

        $this->assertDatabaseHas('replies', ['body' => $reply->body]);
        $this->assertEquals(1, $thread->fresh()->replies_count);
    }

here's is the problem : Failed asserting that a row in the table [replies] matches the attributes, table is empty

when i dd(make('App\Reply') the table field is "null", i think it's from there that my test is failing but i don't know why, i used factory , and in the store method of ReplyController i required the body

here's the factory reply :

$factory->define(App\Reply::class, function (Faker $faker) {
    return [
        'thread_id' => function(){
            return factory('App\Thread')->create()->id;
        },
        'user_id' => function(){
            return factory('App\User')->create()->id;
        },
        'body' => $faker->paragraph,

    ];
});

here's ReplyController, store method :

public function store($channelId, Thread $thread, Spam $spam){-

        $this->validate(request() , [
           'body' => 'required'
        ]);
        $spam->detect(request('body'));

        $reply =$thread->addReply([
            'body' => request('body'),
            'user_id' => auth()->id()
        ]);

        if(request()->expectsJson()){
            return $reply->load('owner');
        }

        return back();
    }

here's my migration :

public function up()
    {
        Schema::create('replies', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('thread_id');
            $table->unsignedBigInteger('user_id');
            $table->text('body');

            $table->timestamps();

        });
    }

ty a lot

Apr
30
1 month ago
Activity icon

Started a new Conversation Subscribe Button Not Working Returning Function Name Must Be A String

hi well again in build forum tutorial (episode 43 : thread subscription) , when i put this line in show.blade.php

<subscribe-button :active="{{  json_encode($thread->isSubscribedTo) }}"></subscribe-button>

it shows me this error : Function name must be a string (it show when i try to click on a thread )

here's the subscribeButton.vue :

<template>
    <button :class="classes"  @click="subscribe">Subscribe</button>
</template>

<script>

    export default {

        props: ['active'],

        computed: {

            classes(){
                return ['btn' , this.active ? 'btn-primary' : 'btn-outline-primary'];
            }
        },
        methods: {
            subscribe(){

                axios[(this.active ? 'delete' : 'post')](location.pathname + '/subscriptions');

                this.active = ! this.active;


            }
        }
    }
</script>

thanks for reply

Apr
29
1 month ago
Activity icon

Started a new Conversation $reply->thread Return Null : Call To A Member Function Increment() On Null

Hi , i'm doing Jeffrey's tut : build a forum with TDD, in the episode 39 "a user can filter by unanswered thread", i did the exact same thing on the video but when i run test i have this error :

"Call to a member function increment() on null"

the problem is in this function (in Reply.php) :

protected static function boot()
{
    parent::boot();

    static::created(function($reply){

        $reply->thread->increment('replies_count'); // $reply->thread is returning NULL idk why :(

    });

    static::deleted(function($reply){

        $reply->thread->decrement('replies_count');
    });
}

kindly help plz :(

Apr
10
1 month ago
Activity icon

Replied to How To Style A Forum, Just Like This Forum ?

thanks for link, but i can't buy anything xD, i don't have money and i live in africa so.. x_x

also, i'm following this tutorial but there is no fancy style on it , i'm looking for a way to style that forum

Activity icon

Started a new Conversation How To Style A Forum, Just Like This Forum ?

hello, can you please me tell how to style a forum to look a bit like this forum ? is it using css/js or something else ? if u can please give me some tut's to style a forum

Apr
09
1 month ago
Activity icon

Replied to Dropdown Not Updating On Front End When I Update Database

i have the same current problem :// and i didn't find out why u_u :(

Activity icon

Replied to Update Does Nothing

yes i think u need to save it , look for laravel 6 from scratch (part eloquet ) he talk about crud operation (create/save/edit etc..)

Activity icon

Replied to Update Does Nothing

i think you should also go to your update function in controller dans save the changes

Apr
08
1 month ago
Activity icon

Replied to Jeffrey Tutorial : Build A Forum With TDD [sequence Diagram, Plz Help]

my problem is, for exemple when a user wants a thread do i also mention channel ? like : seeThread(channel) or seeThread() (message)

i don't know if i should specify channel and sub channel (i will need to add them lol ) every time a user asks to read a thread or no ? , same question when replying to a thread or creating one

-(ty for reply)

Activity icon

Started a new Conversation Jeffrey Tutorial : Build A Forum With TDD [sequence Diagram, Plz Help]

hello, i'm kinda stuck at making a sequence diagram that repesent a forum (taken from Jeffrey's tutoriel), kindly help please

Activity icon

Replied to [SOLVED] Component Form And Action Url

i mean the syntaxe is correct that's why u define it, do you have some kind of error or something ?

Activity icon

Replied to [SOLVED] Component Form And Action Url

the action is correct, since u want to store smth, u need to pass another parameter ? like : {{ route('ur route', $object) }}

look at this : https://laravel.com/docs/7.x/urls

Apr
05
1 month ago
Activity icon

Started a new Conversation Let's Build A Forum : Problem In Channel Table

Sup, i'm following jeffrey tut's on how to build a forum, when i open my project i found out that all my tables are gone from my DB , i re run artisan migrate, after that when i go to "view" channels i found out that the previous one are still there, while it's showing that in channel table there is NO ROW , so basically it's displaying something that doesn't exist in table channel, even if i run artisan tinker and make new channels, the old one keep displaying , any idea ?

Activity icon

Started a new Conversation Laravel And Uml ?

hi :D , i wanted to know how for example we implemtents inheritance in laravel ? because i have 3 classes that extends Person :/

Apr
02
2 months ago
Activity icon

Replied to Is There Any Good Laravel 6.x/7 Tutorial Or Books ?

it's for laravel 5.. .. well ^^

Activity icon

Started a new Conversation Is There Any Good Laravel 6.x/7 Tutorial Or Books ?

Hi ! :D , please, i'm looking for a laravel 6.x/7 books to understand laravel or even a tutorial (ik there is jeffrey tut's, but i didn't understand 100% ) , i need to make a whole website with laravel within 3 months so.. please help me :c i'm using laravel 6