siewlon6093

siewlon6093

Member Since 6 Months Ago

Experience Points
7,410
Total
Experience

2,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
47
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 2
7,410 XP
May
25
2 months ago
Activity icon

Replied to Jquery Undefined

yes @ramjithap I included

<script src="http://code.jquery.com/jquery-1.8.3.min.js" type="text/javascript"></script>
<script src="../node_modules/jquery-validation/dist/jquery.validate.min.js"></script>

but still same error

Activity icon

Started a new Conversation Jquery Undefined

jquery.validate.min.js:4 Uncaught ReferenceError: jQuery is not defined
    at jquery.validate.min.js:4
    at jquery.validate.min.js:4
(anonymous) @ jquery.validate.min.js:4
(anonymous) @ jquery.validate.min.js:4
<?php include 'admin_header.php'; ?>
<?php include 'connection.php' ?>



<body class="bg-primary">
<div id="layoutAuthentication">
    <div id="layoutAuthentication_content">
        <main>
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-7">
                        <div class="card shadow-lg border-0 rounded-lg mt-5">
                            <div class="card-header"><h3 class="text-center font-weight-light my-4">Create Account</h3></div>
                            <div class="card-body">
                                <form action="register.php" method="post" name="registration">
                                        <div class="form-group"><label class="small mb-1"   for="inputUsername">Username</label>
                                            <input class="form-control py-4" id="inputUsername" type="text"  name="username"  placeholder="Enter Username" /></div>
                                    <div class="form-row">
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1" for="inputFirstName">First Name</label>
                                                <input class="form-control py-4" id="inputFirstName" name="firstname" type="text" placeholder="Enter first name" /></div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1" for="inputLastName">Last Name</label>
                                                <input class="form-control py-4" id="inputLastName" name="lastname" type="text" placeholder="Enter last name" /></div>
                                        </div>
                                    </div>
                                    <div class="form-group"><label class="small mb-1"   for="inputEmailAddress">Email</label>
                                        <input class="form-control py-4" id="inputEmailAddress" type="email"  name="email" aria-describedby="emailHelp" placeholder="Enter email address" /></div>
                                    <div class="form-row">
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1"  for="inputPassword">Password</label>
                                                <input class="form-control py-4" id="inputPassword"  name="password" type="password" placeholder="Enter password" /></div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1"    for="inputConfirmPassword">Confirm Password</label>
                                                <input class="form-control py-4" id="inputConfirmPassword" name="password1" type="password" placeholder="Confirm password" /></div>
                                        </div>
                                    </div>
                                    <div class="form-group mt-4 mb-0">
                                        <input type= "submit" class="btn btn-primary btn-block" name="reg_user" onclick="return val()" >Create Account</input></div>
                                </form>
                            </div>
                            <div class="card-footer text-center">
                                <div class="small"><a href="../includes/login.php">Have an account? Go to login</a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
    <div id="layoutAuthentication_footer">
        <footer class="py-4 bg-light mt-auto">
            <div class="container-fluid">
                <div class="d-flex align-items-center justify-content-between small">
                    <div class="text-muted">Copyright &copy; Your Website 2019</div>
                    <div>
                        <a href="#">Privacy Policy</a>
                        &middot;
                        <a href="#">Terms &amp; Conditions</a>
                    </div>
                </div>
            </div>
        </footer>
    </div>
</div>
<?php include 'admin_footer.php'; ?>
<!-- Change the "src" attribute according to your installation path -->
<script src="../node_modules/jquery/dist/jquery.min.js"></script>
<script src="../node_modules/jquery-validation/dist/jquery.validate.min.js"></script>

</body>

<script>
    // Wait for the DOM to be ready
    $(function() {
        // Initialize form validation on the registration form.
        // It has the name attribute "registration"
        $("form[name='registration']").validate({
            // Specify validation rules
            rules: {
                // The key name on the left side is the name attribute
                // of an input field. Validation rules are defined
                // on the right side
                firstname: "required",
                lastname: "required",
                email: {
                    required: true,
                    // Specify that email should be validated
                    // by the built-in "email" rule
                    email: true
                },
                password: {
                    required: true,
                    minlength: 5
                }
            },
            // Specify validation error messages
            messages: {
                firstname: "Please enter your firstname",
                lastname: "Please enter your lastname",
                password: {
                    required: "Please provide a password",
                    minlength: "Your password must be at least 5 characters long"
                },
                email: "Please enter a valid email address"
            },
            // Make sure the form is submitted to the destination defined
            // in the "action" attribute of the form when valid
            submitHandler: function(form) {
                form.submit();
            }
        });
    });


</script>

</html>
Activity icon

Started a new Conversation Php Submit Blank Data Into Sql


<?php
session_start();
include  'connection.php';



if (isset($_POST['reg_user'])) {



   $query = "INSERT INTO users(username, user_password,user_firstname,user_lastname,user_email) 
             VALUES  
             ('" . mysqli_real_escape_string($connection, isset($_POST['username'])) . "',
   '" . mysqli_real_escape_string($connection, isset($_POST['user_password'])) . "',
   '" . mysqli_real_escape_string($connection, isset($_POST['user_firstname'])) . "',
   '" . mysqli_real_escape_string($connection, isset($_POST['user_lastname'])) . "',
   '" . mysqli_real_escape_string($connection, isset($_POST['user_email'])) . "'
   
   )";

   $result = mysqli_query($connection ,$query);
   if(!$result){
       die('Query FAILED');
   }
}


<?php include 'admin_header.php'; ?>
<?php include 'connection.php' ?>



<body class="bg-primary">
<div id="layoutAuthentication">
    <div id="layoutAuthentication_content">
        <main>
            <div class="container">
                <div class="row justify-content-center">
                    <div class="col-lg-7">
                        <div class="card shadow-lg border-0 rounded-lg mt-5">
                            <div class="card-header"><h3 class="text-center font-weight-light my-4">Create Account</h3></div>
                            <div class="card-body">
                                <form action="function.php" method="post">
                                    <div class="form-row">
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1" name="firstname" for="inputFirstName">First Name</label><input class="form-control py-4" id="inputFirstName" type="text" placeholder="Enter first name" /></div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1" name="lastname" for="inputLastName">Last Name</label><input class="form-control py-4" id="inputLastName" type="text" placeholder="Enter last name" /></div>
                                        </div>
                                    </div>
                                    <div class="form-group"><label class="small mb-1"  name="email" for="inputEmailAddress">Email</label><input class="form-control py-4" id="inputEmailAddress" type="email" aria-describedby="emailHelp" placeholder="Enter email address" /></div>
                                    <div class="form-row">
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1"  name="password" for="inputPassword">Password</label><input class="form-control py-4" id="inputPassword" type="password" placeholder="Enter password" /></div>
                                        </div>
                                        <div class="col-md-6">
                                            <div class="form-group"><label class="small mb-1"   name="password1"  for="inputConfirmPassword">Confirm Password</label><input class="form-control py-4" id="inputConfirmPassword" type="password" placeholder="Confirm password" /></div>
                                        </div>
                                    </div>
                                    <div class="form-group mt-4 mb-0">
                                        <input type= "submit"class="btn btn-primary btn-block" name="reg_user" >Create Account</input></div>
                                </form>
                            </div>
                            <div class="card-footer text-center">
                                <div class="small"><a href="../includes/login.php">Have an account? Go to login</a></div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </main>
    </div>
    <div id="layoutAuthentication_footer">
        <footer class="py-4 bg-light mt-auto">
            <div class="container-fluid">
                <div class="d-flex align-items-center justify-content-between small">
                    <div class="text-muted">Copyright &copy; Your Website 2019</div>
                    <div>
                        <a href="#">Privacy Policy</a>
                        &middot;
                        <a href="#">Terms &amp; Conditions</a>
                    </div>
                </div>
            </div>
        </footer>
    </div>
</div>
<?php include 'admin_footer.php'; ?>
</body>
</html>

https://imgur.com/a/j4DOwqd

Apr
02
4 months ago
Activity icon

Replied to Error: Call To A Member Function Increment() On Null

yes I changed back to $like->creator()

Error: Call to a member function increment() on null
Activity icon

Replied to Error: Call To A Member Function Increment() On Null

LogicException: App\Models\Like::user must return a relationship instance, but "null" was returned. Was the "return" keyword used?

@hasnayeen showing this errors

Activity icon

Replied to Error: Call To A Member Function Increment() On Null

yes its working I follow the tutorial of laracast series @tisuchi

Activity icon

Started a new Conversation Error: Call To A Member Function Increment() On Null

    public function test_a_user_earns_points_when_they_create()
    {
       $like = factory('App\Models\Like')->create();

       $this->assertEquals(10, $like->creator->reputation);
    }

Testphp

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

        static::created(function ($like){
            $like->creator->increment('reputation', 10);
        });
    }

    public function creator()
    {
        return $this->belongsTo(User::class, 'user_id');
    }

	public function user() {
        return $this->belongsTo('App\Models\User')->first();
    }

like.php

Mar
31
4 months ago
Activity icon

Replied to Php Artisan Migrate:refresh Error

@hjortur17 return to same issue :(

Activity icon

Replied to Php Artisan Migrate:refresh Error

@tisuchi return to same issue

Activity icon

Replied to Php Artisan Migrate:refresh Error

@shez1983

<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class CreateAdminSettingsTable extends Migration {

	/**
	 * Run the migrations.
	 *
	 *
     * @return void
	 */
	public function up()
	{
		Schema::create('admin_settings', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('title');
			$table->text('description');
			$table->string('welcome_text', 200);
			$table->text('welcome_subtitle');
			$table->string('keywords');
			$table->integer('result_request')->unsigned()->comment('The max number of images per request');
			$table->integer('limit_upload_user')->unsigned();
			$table->enum('status_page', array('0','1'))->default('1')->comment('0 Offline, 1 Online');
			$table->integer('message_length')->unsigned();
			$table->integer('comment_length')->unsigned();
			$table->enum('registration_active', array('0','1'))->default('1')->comment('0 No, 1 Yes');
			$table->enum('email_verification', array('0','1'))->comment('0 Off, 1 On');
			$table->string('email_no_reply', 200);
			$table->string('email_admin', 200);
			$table->enum('captcha', array('on','off'))->default('on');
			$table->integer('file_size_allowed')->unsigned()->comment('Size in Bytes');
			$table->enum('facebook_login', array('on','off'))->default('off');
			$table->text('google_analytics');
			$table->enum('invitations_by_email', array('on','off'))->default('on');
			$table->string('twitter', 200);
			$table->string('facebook', 200);
			$table->string('googleplus', 200);
			$table->string('linkedin', 200);
			$table->string('instagram', 200);
			$table->text('google_adsense');
			$table->enum('auto_approve_images', array('on','off'))->default('off');
			$table->integer('tags_limit')->unsigned();
			$table->enum('downloads', array('all','users'))->default('all');
			$table->enum('google_ads_index', array('on','off'))->default('off');
			$table->integer('description_length')->unsigned();
			$table->string('min_width_height_image', 25);
			$table->text('google_adsense_index');
			$table->string('link_privacy', 200);
			$table->string('link_terms', 200);
			$table->enum('twitter_login', array('on','off'))->default('off');
			$table->enum('paypal_sandbox', array('true','false'))->default('true');
			$table->string('paypal_account', 200);
			$table->integer('fee_commission')->unsigned();
			$table->string('stripe_secret_key', 200);
			$table->string('stripe_public_key', 200);
			$table->integer('max_deposits_amount')->unsigned();
			$table->integer('min_deposits_amount')->unsigned();
			$table->integer('min_sale_amount')->unsigned();
			$table->integer('max_sale_amount')->unsigned();
			$table->enum('enable_paypal', array('0','1'))->default('0');
			$table->enum('enable_stripe', array('0','1'))->default('0');
			$table->enum('currency_position', array('left','right'))->default('left');
			$table->string('currency_symbol', 200);
			$table->string('currency_code', 200);
			$table->integer('amount_min_withdrawal')->unsigned();
			$table->enum('sell_option', array('on','off'))->default('on');
			$table->enum('show_images_index', array('latest','featured','both'))->default('latest');
			$table->enum('show_watermark', array('1','0'))->default('1');
			$table->integer('file_size_allowed_vector')->unsigned()->default(1024);
		});
	}


	/**
	 * Reverse the migrations.
	 *
	 * @return void
	 */
	public function down()
	{
		Schema::drop('admin_settings');
	}

}

https://imgur.com/a/2naH92c

Activity icon

Replied to Php Artisan Migrate:refresh Error

php artisan migrate:fresh @untymage

Base table or view not found: 1146 Table 'euzlarmy_21pixar.admin_settings' doesn't exist (SQL: select * from `admin_settings` limit 1)
Activity icon

Replied to Php Artisan Migrate:refresh Error

OMG @tisuchi annoying error :(

When I run composer clear-cache, It clear all the cache

but when I run php artisan cache:clear go back to same errors

Activity icon

Replied to Php Artisan Migrate:refresh Error

yes @tisuchi I already delete all the tables in database and run php artisan migrate

 SQLSTATE[42S02]: Base table or view not found: 1146 Table 'euzlarmy_21pixar.admin_settings' doesn't exist (SQL: select * from `admin_settings` limit 1)

composer dump-autoload

Illuminate\Database\QueryException  : SQLSTATE[42S02]: Base table or view not found: 1146 Table 'euzlarmy_21pixar.admin_settings' doesn't exist (SQL: select * from `admin_settings` limit 1)

Activity icon

Replied to Php Artisan Migrate:refresh Error

yes I have done all the step @tisuchi

 Base table or view not found: 1146 Table '
<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class AdminSettings extends Model {

	protected $guarded = array();
	public $timestamps = false;

}

This is my models

Activity icon

Started a new Conversation Php Artisan Migrate:refresh Error

QLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_settings' already exists

I delete the admin_settings table and run php artisan migrate its show error too

 Base table or view not found: 1146 Table
Mar
30
4 months ago
Activity icon

Replied to Undefined Variable: Users

@snapey any better option ? if don`t use db? Because I want to show data to view :) Thanks for reply

Activity icon

Started a new Conversation Undefined Variable: Users

public function index()
    {
       $select = DB::select('select * from users ');
        return view('index')->with('name' ,$select);
    }
@foreach($users as $user)
    <li>{{$user->reputation}}</li>
@endforeach

what errors :( ?

Mar
29
4 months ago
Activity icon

Started a new Conversation Call To A Member Function Threads() On Null

    public function store(Request $request)
    {
        $threads = new Threads;
        $threads -> title = request('title');
        $threads -> body = request('body');
        
        $user = $request->user();
        $threads = $user->threads()->create($request->only(['title', 'body']));
        givePoint(new PostCreated($threads));

        $threads ->save();

    }
Mar
24
4 months ago
Activity icon

Started a new Conversation Protected Static Function Boot()

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

What this code do? Can someone explain to me?

and what difference between


( public , private , protected ) ??
Mar
16
4 months ago
Activity icon

Started a new Conversation ERROR 404

Error 404 fix
Mar
11
4 months ago
Activity icon

Replied to Failed Asserting That '<!doctype Html>\n <html Lang="en">\n

Response status code [500] does not match expected 200 status code. Failed asserting that false is true.

Activity icon

Started a new Conversation Failed Asserting That '<!doctype Html>\n <html Lang="en">\n

 Tests\Feature\ParticipateInForumTest::test_an_authenticated_user_may_participate_in_forum_threads
Failed asserting that '<!doctype html>\n
<html lang="en">\n
<head>\n
    <meta charset="utf-8">\n
    <meta name="viewport" content="width=device-width, initial-scale=1">\n
\n
    <!-- CSRF Token -->\n
    <meta name="csrf-token" content="obqBIMUAxRZcpRSG3rwWV87tY8Khw3VPCscRuuF2">\n
\n
    <title>Laravel</title>\n
\n
    <!-- Scripts -->\n
    <script src="http://localhost/js/app.js" defer></script>\n
\n
    <!-- Fonts -->\n
    <link rel="dns-prefetch" href="//fonts.gstatic.com">\n
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">\n
\n
    <!-- Styles -->\n
    <link href="http://localhost/css/app.css" rel="stylesheet">\n
</head>\n
<body>\n
    <div id="app">\n
        <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">\n
            <div class="container">\n
                <a class="navbar-brand" href="http://localhost">\n
                    Laravel\n
                </a>\n
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">\n
                    <span class="navbar-toggler-icon"></span>\n
                </button>\n
\n
                <div class="collapse navbar-collapse" id="navbarSupportedContent">\n
                    <!-- Left Side Of Navbar -->\n
                    <ul class="navbar-nav mr-auto">\n
\n
                    </ul>\n
\n
                    <!-- Right Side Of Navbar -->\n
                    <ul class="navbar-nav ml-auto">\n
                        <!-- Authentication Links -->\n
                                                    <li class="nav-item dropdown">\n
                                <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>\n
                                    Vivian Rosenbaum <span class="caret"></span>\n
                                </a>\n
\n
                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">\n
                                    <a class="dropdown-item" href="http://localhost/logout"\n
                                       onclick="event.preventDefault();\n
                                                     document.getElementById('logout-form').submit();">\n
                                        Logout\n
                                    </a>\n
\n
                                    <form id="logout-form" action="http://localhost/logout" method="POST" style="display: none;">\n
                                        <input type="hidden" name="_token" value="obqBIMUAxRZcpRSG3rwWV87tY8Khw3VPCscRuuF2">                                    </form>\n
                                </div>\n
                            </li>\n
                                            </ul>\n
                </div>\n
            </div>\n
        </nav>\n
\n
        <main class="py-4">\n
                <div class="container">\n
        <div class="row justify-content-center">\n
            <div class="col-md-8">\n
\n
                <div class="card">\n
                    <div class="card-header">\n
                        <a href="#">Gussie Treutel\n
                            Ms.\n
                        </a>\n
                        posted:\n
                    </div>\n
\n
                    <div class="card-body">\n
                       Pariatur in error modi sed fugit. Aut molestias qui beatae et vero hic suscipit. Consequuntur dicta eveniet modi quis.\n
                    </div>\n
                </div>\n
            </div>\n
        </div>\n
    </div>\n
\n
       <div class = "container">\n
        <div class="row justify-content-center">\n
            <div class="col-md-8">\n
                            </div>\n
        </div>\n
       </div>\n
        </main>\n
    </div>\n
</body>\n
</html>\n
' contains "Eius cupiditate dolore possimus voluptas numquam qui illum. Quos voluptatem rerum quaerat. Est omnis corrupti maiores. Aperiam architecto provident nemo quis rem omnis.".

C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Testing\TestResponse.php:400
C:\xampp\htdocs\blog\tests\Feature\ParticipateInForumTest.php:30
   function test_an_authenticated_user_may_participate_in_forum_threads()
    {
        $this->be($user = factory('App\User')->create());

        $thread = factory('App\Thread')->create();

        $reply = factory('App\Reply')->make();
        $this->post('/threads/' .$thread->id. '/replies', $reply->toArray());

        $this->get($thread->path())->assertSee($reply->body);
    }

can someone help please?

Activity icon

Started a new Conversation This Test Did Not Perform Any Assertions

$ vendor/bin/phpunit --filter ParticipateInFormTest
PHPUnit 8.5.2 by Sebastian Bergmann and contributors.

R                                                                   1 / 1 (100%)

Time: 6.52 seconds, Memory: 24.00 MB

There was 1 risky test:

1) Tests\Feature\ParticipateInFormTest::test_an_authenticated_user_may_participate_in_forum_threads
This test did not perform any assertions

C:\xampp\htdocs\blog\tests\Feature\ParticipateInFormTest.php:21

OK, but incomplete, skipped, or risky tests!
Tests: 1, Assertions: 0, Risky: 1.

<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;

class ParticipateInFormTest extends TestCase
{
    use DatabaseMigrations;

    /** @test */
  //  function unauthenticated_users_may_not_add_replies()
  //  {
  //      $this->expectException('Illuminate\Auth\AuthenticationException');
//
  //      $this->post('/threads/1/replies', []);
  //  }

    /** @test */
    function test_an_authenticated_user_may_participate_in_forum_threads()
    {
        $this->be($user = factory('App\User')->create());

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

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

       // $this->get($thread->path())->assertSee($reply->body);
    }
}

ParticipateInFormTest.php

Activity icon

Started a new Conversation Laravel Subscription Problem

Hey guys, i am doing subscription in my laravel project, but i am facing this error when i run then system.

There is no role named `subscriber`.

SubscriptionController.php

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;

class SubscriptionController extends Controller
{
    public function index()
    {
        return view('subscribe');
    }

    public function store(Request $request)
    {
    
        $token =$request->stripeToken;
     
        auth()->user()->newSubscription('main','monthly')->withCoupon($request->coupon)->create($token);   

		auth()->user()->assignRole('subscriber');

		return redirect('/blog');


    }

}

Anyone know what about this problem?Thanks

Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory For [\App\Reply].

1) Tests\Unit\ReplyTest::test_it_has_an_owner
InvalidArgumentException: Unable to locate factory for [App\thread].

C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:116
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\blog\database\factories\UserFactory.php:44
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:364
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:282
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\blog\tests\Unit\ReplyTest.php:16

popup error @sinnbeck

Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory For [\App\Reply].

@sinnbeck

InvalidArgumentException: Unable to locate factory for [App\thread].

Activity icon

Started a new Conversation InvalidArgumentException: Unable To Locate Factory For [\App\Reply].

1) Tests\Unit\ReplyTest::test_it_has_an_owner
InvalidArgumentException: Unable to locate factory for [\App\Reply].

C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\blog\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\blog\tests\Unit\ReplyTest.php:16

<?php

namespace Tests\Unit;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;

class ReplyTest extends TestCase
{
    use DatabaseMigrations;

    public function  setUp(): void
    {
        parent::setUp();

        $this->reply = factory('\App\Reply')->create();
    }

    function test_it_has_an_owner()
    {


        $this->assertInstanceOf('\App\User', $this->reply->owner);
    }
}

ReplyTest.php

<?php

namespace App;

use Illuminate\Database\Eloquent\Model;


class Reply extends Model
{
    public function owner()
    {
      return $this->belongsTo(User::class, 'user_id');
    }
}

Reply.php

<?php

/** @var \Illuminate\Database\Eloquent\Factory $factory */

use App\User;
use Faker\Generator as Faker;
use Illuminate\Support\Str;

/*
|--------------------------------------------------------------------------
| Model Factories
|--------------------------------------------------------------------------
|
| This directory should contain each of the model factory definitions for
| your application. Factories provide a convenient way to generate new
| model instances for testing / seeding your application's database.
|
*/

$factory->define(User::class, function (Faker $faker) {
    return [
        'name' => $faker->name,
        'email' => $faker->unique()->safeEmail,
        'email_verified_at' => now(),
        'password' => 'yIXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', // password
        'remember_token' => Str::random(10),
    ];
});

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

    ];
});

$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

    ];
});

UserFactory.php

I tried composer dump-autoload / php artisan config:clear / php artisan config:cache / add slash everything I tried still not working please help me :(

Mar
10
4 months ago
Activity icon

Replied to Base Table Or View Not Found: 1146 Table 'euzlarmy_21pixar.admin_settings' Doesn't Exist (SQL: Select * From `admin_settings` Limit 1)

@rodrigo.pedra

 SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'admin_settings' already exists (SQL: create table `admin_settings` (`id` 

When I run php artisan migrate

Mar
09
5 months ago
Activity icon

Started a new Conversation SQLSTATE[42S22]: Column Not Found

:test_a_user_earns_points_when_they_create Illuminate\Database\QueryException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'image' in 'field list' (SQL: insert into images (image) values (0))

$table->integer('id', true);
			$table->string('thumbnail');
			$table->string('preview', 100)->index('image');
			$table->string('title');
			$table->text('description', 65535);
			$table->integer('categories_id')->unsigned()->index('category_id');
			$table->integer('user_id')->unsigned();
			$table->timestamp('date')->default(DB::raw('CURRENT_TIMESTAMP'));
			$table->enum('status', array('active','pending'))->default('pending');
			$table->string('token_id')->unique('token_id');
			$table->text('tags', 65535);
			$table->string('extension', 25);
			$table->text('colors', 65535);
			$table->string('exif');
			$table->string('camera');
			$table->enum('featured', array('yes','no'))->default('no');
			$table->dateTime('featured_date')->default('0000-00-00 00:00:00');
			$table->enum('how_use_image', array('free','free_personal','editorial_only','web_only'))->default('free');
			$table->enum('attribution_required', array('yes','no'))->default('no');
			$table->string('original_name');
			$table->integer('price')->unsigned();
			$table->enum('item_for_sale', array('free','sale'))->default('free');
			$table->string('vector', 3);
			$table->index(['title','tags'], 'title');
			$table->index(['user_id','status','token_id'], 'author_id');
		});

create_image_table

   public function test_a_user_earns_points_when_they_create()
    {
       $images = factory('App\Models\Images')->create();

       $this->assertEquals(10, $images->user->reputation);
    }

reputationtest

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

        static::created(function ($images) {
            $images->user->increment('reputation', 10);
        });
    }
Activity icon

Replied to How To Convert Existing Database To Laravel Migration

convert exisiting database to laravel migration is that possible?

Activity icon

Started a new Conversation How To Convert Existing Database To Laravel Migration

I need to convert existing database to laravel migration

Mar
08
5 months ago
Activity icon

Started a new Conversation Open Cart Problem

Warning: mysqli::__construct(): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/system/library/db/mysqli.php on line 7Warning: mysqli::__construct(): (HY000/2002): php_network_getaddresses: getaddrinfo failed: Name or service not known in /var/www/html/system/library/db/mysqli.php on line 7Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/www/html/system/library/db/mysqli.php on line 10Warning: DB\MySQLi::__construct(): Couldn't fetch mysqli in /var/www/html/system/library/db/mysqli.php on line 10
Fatal error: Uncaught Exception: Error: <br />Error No: in /var/www/html/system/library/db/mysqli.php:10 Stack trace: #0 /var/www/html/system/library/db.php(31): DB\MySQLi->__construct('mysqlserver', 'root', 'myfurniturelab', 'myfurniturelab', '3306') #1 /var/www/html/system/framework.php(80): DB->__construct('mysqli', 'mysqlserver', 'root', 'myfurniturelab', 'myfurniturelab', '3306') #2 /var/www/html/vqmod/vqcache/vq2-system_startup.php(104): require_once('/var/www/html/s...') #3 /var/www/html/index.php(43): start('catalog') #4 {main} thrown in /var/www/html/system/library/db/mysqli.php on line 10

Hey guys, my website suddenly get this errors? Anyone know why this issue happended?

Mar
07
5 months ago
Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory With Name [default]. ??

<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;
use App\Http\Controllers\Traits\Search;
use function foo\func;

class Images extends Model
{

	use Search;

	protected $guarded = array();
	public $timestamps = false;

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

        static::created(function ($images) {
            $images->user->increment('reputation', 10);
        });
    }

    protected $fillable = [
        'title', 'description', 'categories_id', 'tags','camera','exif', 'how_use_image', 'attribution_required', 'price', 'item_for_sale'
    ];

		protected $searchable = [
	        'title',
	        'tags'
	    ];

	public function user() {
        return $this->belongsTo('App\Models\User')->first();
    }

	public function likes(){
		return $this->hasMany('App\Models\Like')->where('status', '1');
	}

	public function downloads(){
		return $this->hasMany('App\Models\Downloads');
	}

	public function stock(){
		return $this->hasMany('App\Models\Stock')->orderBy('type','asc');
	}

	 public function comments(){
		return $this->hasMany('App\Models\Comments');
	}

	 public function visits(){
		return $this->hasMany('App\Models\Visits');
	}

	 public function category() {
	 	 return $this->belongsTo('App\Models\Categories', 'categories_id');
	 }

	 public function collections() {
	 	 return $this->belongsTo('App\Models\Collections');
	 }

	 public function collectionsImages() {
	 	 return $this->belongsTo('App\Models\CollectionsImages');
	 }

	  public function tags() {
	 	 return $this->hasMany('App\Models\Images', 'tags');
	 }

	 public function purchases(){
 		return $this->hasMany('App\Models\Purchases');
 	}
}
Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory With Name [default]. ??

1) Tests\Feature\ReputationTest::test_a_user_earns_points_when_they_create
InvalidArgumentException: Unable to locate factory with name [default] [\App\Models\Images].

still same error :(

$factory->define(App\Models\Images::class, function (Faker $faker) {
    return [
        'image' => $faker->image('public/storage/images',640,480, null, false),

    ];
Activity icon

Started a new Conversation InvalidArgumentException: Unable To Locate Factory With Name [default]. ??

$factory->define(Images::class, function (Faker $faker) {
    return [
        'image' => $faker->image('public/storage/images',640,480, null, false),

    ];
});

UserFactory.php

   public function test_a_user_earns_points_when_they_create()
    {
       $thread = factory('\App\Models\Images')->create();

       $this->assertEquals(10, $thread->user->reputation);
    }

ReputationTest.php

Activity icon

Started a new Conversation Error: Call To Undefined Function Tests\Feature\create() ?

public function test_a_user_earns_points_when_they_create()
    {
       $thread = create('App\Models\Images');

       $this->assertEquals(10, $thread->user->reputation);
    }
Mar
05
5 months ago
Activity icon

Replied to Phpunit Error Help!

yes I did but still error

Activity icon

Started a new Conversation Phpunit Error Help!


There was 1 error:

1) Tests\Feature\ParticipateInThreadsTest::unauthenticated_users_may_not_add_replies
Symfony\Component\Routing\Exception\RouteNotFoundException: Route [/login] not defined.

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Routing\UrlGenerator.php:420
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Foundation\helpers.php:767
C:\xampp\htdocs\forum\tests\Feature\ParticipateInForumTest.php:16

--

There was 1 failure:

1) Tests\Feature\ParticipateInThreadsTest::an_authenticated_user_may_participate_in_forum_threads
Failed asserting that '<!doctype html>\n
<html lang="en">\n
<head>\n
    <meta charset="utf-8">\n
    <meta name="viewport" content="width=device-width, initial-scale=1">\n
\n
    <!-- CSRF Token -->\n
    <meta name="csrf-token" content="CWJnD4MBtIUHJr8IjyTOe7qPmrivhbcgiQ13KYTu">\n
\n
    <title>Laravel</title>\n
\n
    <!-- Scripts -->\n
    <script src="http://localhost/js/app.js" defer></script>\n
\n
    <!-- Fonts -->\n
    <link rel="dns-prefetch" href="//fonts.gstatic.com">\n
    <link href="https://fonts.googleapis.com/css?family=Nunito" rel="stylesheet">\n
\n
    <!-- Styles -->\n
    <link href="http://localhost/css/app.css" rel="stylesheet">\n
</head>\n
<body>\n
    <div id="app">\n
        <nav class="navbar navbar-expand-md navbar-light bg-white shadow-sm">\n
            <div class="container">\n
                <a class="navbar-brand" href="http://localhost">\n
                    Laravel\n
                </a>\n
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">\n
                    <span class="navbar-toggler-icon"></span>\n
                </button>\n
\n
                <div class="collapse navbar-collapse" id="navbarSupportedContent">\n
                    <!-- Left Side Of Navbar -->\n
                    <ul class="navbar-nav mr-auto">\n
\n
                    </ul>\n
\n
                    <!-- Right Side Of Navbar -->\n
                    <ul class="navbar-nav ml-auto">\n
                        <!-- Authentication Links -->\n
                                                    <li class="nav-item dropdown">\n
                                <a id="navbarDropdown" class="nav-link dropdown-toggle" href="#" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" v-pre>\n
                                    Jimmy Toy Sr. <span class="caret"></span>\n
                                </a>\n
\n
                                <div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">\n
                                    <a class="dropdown-item" href="http://localhost/logout"\n
                                       onclick="event.preventDefault();\n
                                                     document.getElementById('logout-form').submit();">\n
                                        Logout\n
                                    </a>\n
\n
                                    <form id="logout-form" action="http://localhost/logout" method="POST" style="display: none;">\n
                                        <input type="hidden" name="_token" value="CWJnD4MBtIUHJr8IjyTOe7qPmrivhbcgiQ13KYTu">                                    </form>\n
                                </div>\n
                            </li>\n
                                            </ul>\n
                </div>\n
            </div>\n
        </nav>\n
\n
        <main class="py-4">\n
                <div class="container">\n
        <div class="row">\n
            <div class="col-md-8 col-md-offset-2">\n
                <div class="panel panel-default">\n
                    <div class="panel-heading">\n
                        <a href="#">Mrs. Anahi Hartmann</a> posted:\n
                        Ut inventore sint et neque velit ut cumque.\n
                    </div>\n
\n
                    <div class="panel-body">\n
                        Veniam esse ad molestiae ad. Eos odit rem et consequuntur. Ab omnis repellendus nihil molestiae vero ut. Modi cupiditate dolor est aut cumque sed provident. Accusantium laboriosam sapiente eos et.\n
                    </div>\n
                </div>\n
            </div>\n
        </div>\n
\n
        <div class="row">\n
            <div class="col-md-8 col-md-offset-2">\n
                            </div>\n
        </div>\n
    </div>\n
\n
            <div class="row">\n
            <div class="col-md-8 col-md-offset-2">\n
                <form method="POST" action="/threads/1/replies" >\n
                    <label for="body"></label>\n
                    <textarea name="body" id="body" class="form-control">\n
\n
                </textarea>\n
                </form>\n
            </div>\n
        </div>\n
            </main>\n
    </div>\n
</body>\n
</html>\n
' contains "In et similique sint reprehenderit. Hic iure sit reiciendis enim placeat. Temporibus repellendus quis harum quos. A voluptas consequatur est cupiditate reprehenderit. Voluptate laboriosam fugit tempore hic ut eos.".

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Testing\TestResponse.php:400
C:\xampp\htdocs\forum\tests\Feature\ParticipateInForumTest.php:29
<?php

namespace Tests\Feature;

use Illuminate\Foundation\Testing\DatabaseMigrations;
use Tests\TestCase;

class ParticipateInThreadsTest extends TestCase
{
    use DatabaseMigrations;

    /** @test */
    function unauthenticated_users_may_not_add_replies()
    {
        $response = $this->post('/threads/1/replies', []);
        $response->assertRedirect(route('/login'));
    }

    /** @test */
    function an_authenticated_user_may_participate_in_forum_threads()
    {
        $this->be($user = factory('App\User')->create());

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

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

        $this->get($thread->path())->assertSee($reply->body);
    }
}

participateInForumTest.php

<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/


use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\Route;


Route::get('/', function () {
    return view('welcome');
});

Auth::routes();

Route::get('/home', '[email protected]')->name('home');

Route::get('/threads', '[email protected]');
Route::get('/threads/{thread}', '[email protected]');
Route::get('/threads/{thread}/replies', '[email protected]');

web.php

Activity icon

Replied to Phpunit Error Help!

@sti3bas added but show error

There was 1 error:

1) Tests\Feature\ParticipateInThreadsTest::unauthenticated_users_may_not_add_rep
Symfony\Component\Routing\Exception\RouteNotFoundException: Route [] not defined

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Routing\UrlGenerat
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Foundation\helpers
C:\xampp\htdocs\forum\tests\Feature\ParticipateInForumTest.php:16
Activity icon

Replied to Phpunit Error Help!

is not working

Activity icon

Started a new Conversation Phpunit Error Help!


1) Tests\Feature\ParticipateInThreadsTest::unauthenticated_users_may_not_add_replies
Failed asserting that exception of type "\Illuminate\Auth\AuthenticationException" is thrown.
 function unauthenticated_users_may_not_add_replies()
    {
        $this->expectException('\Illuminate\Auth\AuthenticationException');

        $this->post('/threads/1/replies', []);
    }
Activity icon

Started a new Conversation Column Not Found: 1054 Unknown Column 'users.user_id

SQLSTATE[42S22]: Column not found: 1054 Unknown column 'users.user_id' in 'where clause' (SQL: select * from `users` where `users`.`user_id` = 37 and `users`.`user_id` is not null) (View: C:\xampp\htdocs\forum\resources\views\threads\show.blade.php)
<?php

namespace App;

use Illuminate\Database\Eloquent\Model;

class Thread extends Model
{
    protected $guarded = [];

    public function setUp():void
    {
        parent::setUp();

        $this->thread = factory('App\Thread')->create();
    }
    public function path()
    {
       return '/threads/' . $this->id;
    }

    public function replies()
    {
        return $this->hasMany(Reply::class);
    }

    public function creator()
    {
        return $this->hasMany(User::class , 'user_id');
    }

    public function addReply($reply)
    {
        $this->replies()->create($reply);
    }
}
Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory For [App\Thread].

yes @sinnbeck

There were 2 errors:

1) Tests\Unit\ThreadTest::test_a_thread_has_a_creator
InvalidArgumentException: Unable to locate factory for [\App\Thread].

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\forum\tests\Unit\ThreadTest.php:19

2) Tests\Unit\ThreadTest::test_a_thread_can_add_a_reply
InvalidArgumentException: Unable to locate factory for [\App\Thread].

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\forum\tests\Unit\ThreadTest.php:19
Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory For [App\Thread].

@sinnbeck yes I added leading slash but still same error

Activity icon

Replied to InvalidArgumentException: Unable To Locate Factory For [App\Thread].

@sinnbeck yes already put still same error

There were 4 errors:

1) Tests\Unit\ParticipateInForum::test_an_authenticated_user_may_participate_in_forum_threads
Error: Call to undefined method Tests\Unit\ParticipateInForum::be()

C:\xampp\htdocs\forum\tests\Unit\ParticipateInForumTest.php:14

2) Tests\Unit\ReplyTest::test_it_has_an_owner
InvalidArgumentException: Unable to locate factory for [\App\Reply].

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\forum\tests\Unit\ReplyTest.php:14

3) Tests\Unit\ThreadTest::test_a_thread_has_a_creator
InvalidArgumentException: Unable to locate factory for [App\Thread].

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\forum\tests\Unit\ThreadTest.php:19

4) Tests\Unit\ThreadTest::test_a_thread_can_add_a_reply
InvalidArgumentException: Unable to locate factory for [App\Thread].

C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:273
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:296
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\Concerns\GuardsAttributes.php:122
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:304
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:223
C:\xampp\htdocs\forum\vendor\laravel\framework\src\Illuminate\Database\Eloquent\FactoryBuilder.php:169
C:\xampp\htdocs\forum\tests\Unit\ThreadTest.php:19