Randy_Johnson

Randy_Johnson

Member Since 2 Years Ago

Experience Points
7,930
Total
Experience

2,070 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
9
Lessons
Completed
Best Reply Awards
1
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,930 XP
Oct
22
5 days ago
Activity icon

Started a new Conversation LiveWire: Passing Data From One Component To Another

Hi, I currently have a navigation bar, and an area where I wish to show the contents of a db. The two areas are two different components. Com - A, Com - B.

Clicking a button in com A will change the data in com B. I currently have com B set up and working but now I have to make it so com A works with it.

    public function Fee() {
        $this->page = "Fees";
        $x = new ShowAdmins($this->page);
        $x->render();
    }

I tried doing this but it does nothing. Also whilst am here, is there anyway to debug information in livewire. echo etc.

Activity icon

Replied to Livewire If Statement In Render

Oh my god am so out of touch.

Activity icon

Started a new Conversation Livewire If Statement In Render

Now I am seem to be getting a problem where the if statement is ignored completely, $x is set to Users but its jumping into the first statement as if $x was set to Fees.

Its giving me this error which is strange because before trying out this new tactic in displaying each set of data individually it was working fine.

Invalid argument supplied for foreach() (View: C:\Users\Josh\Desktop\Projects\spatie-permissions\resources\views\livewire\show-fees.blade.php)

namespace App\Http\Livewire;

use Livewire\Component; use App\Models\Fee; use App\Models\Grade; use App\Models\Injury; use App\Models\Payment; use App\Models\Report; use App\Models\Subject; use App\Models\TimeTable; use App\Models\User;

class ShowAdmins extends Component { public $x = "Users"; public $data;

private function Fee() {
    $this->x = "Fees";
}

private function Grade() {
    $this->x = "Grades";
}

private function Injury() {
    $this->x = "Injuries";
}

private function Payment() {
    $this->x = "Payments";
}

private function Report() {
    $this->x = "Grades";
}

private function Subject() {
    $this->x = "Subjects";
}

private function TimeTable() {
    $this->x = "TimeTables";
}

private function User() {
    $this->x = "Users";
}

public function render()
{
    if ($x = "Fees") {
        $data = Fee::all();
        return view('livewire.show-fees')->with('data', $data);
    } else if ($x = "Grades") {
        $data = Grade::all();
        return view('livewire.show-grades')->with('data', $data);
    } else if ($x = "Injuries") {
        $data = Injury::all();
        return view('livewire.show-injuries')->with('data', $data);
    } else if ($x = "Payments") {
        $data = Payment::all();
        return view('livewire.show-payments')->with('data', $data);
    } else if ($x = "Reports") {
        $data = Subject::all();
        return view('livewire.show-reports')->with('data', $data);
    } else if ($x = "Subjects") {
        $data = TimeTable::all();
        return view('livewire.show-subjects')->with('data', $data);
    } else if ($x = "TimeTables") {
        $data = User::all();
        return view('livewire.show-time-tables')->with('data', $data);
    } else if ($x = "Users") {
        $data = User::all();
        return view('livewire.show-users')->with('data', $data);
    } else {
        $data = User::all();
        return view('livewire.show-users')->with('data', $data);
    }
}

}

Oct
21
6 days ago
Activity icon

Replied to Livewire Component Not Found

Now I am seem to be getting a problem where the if statement is ignored completely, $x is set to Users but its jumping into the first statement as if $x was set to Fees.

Its giving me this error which is strange because before trying out this new tactic in displaying each set of data individually it was working fine.

Invalid argument supplied for foreach() (View: C:\Users\Josh\Desktop\Projects\spatie-permissions\resources\views\livewire\show-fees.blade.php) (View: C:\Users\Josh\Desktop\Projects\spatie-permissions\resources\views\livewire\show-fees.blade.php) 
<?php

namespace App\Http\Livewire;

use Livewire\Component;
use App\Models\Fee;
use App\Models\Grade;
use App\Models\Injury;
use App\Models\Payment;
use App\Models\Report;
use App\Models\Subject;
use App\Models\TimeTable;
use App\Models\User;

class ShowAdmins extends Component
{
    public $x = "Users";
    public $data;
    
    private function Fee() {
        $this->x = "Fees";
    }

    private function Grade() {
        $this->x = "Grades";
    }

    private function Injury() {
        $this->x = "Injuries";
    }

    private function Payment() {
        $this->x = "Payments";
    }

    private function Report() {
        $this->x = "Grades";
    }

    private function Subject() {
        $this->x = "Subjects";
    }

    private function TimeTable() {
        $this->x = "TimeTables";
    }

    private function User() {
        $this->x = "Users";
    }

    public function render()
    {
        if ($x = "Fees") {
            $data = Fee::all();
            return view('livewire.show-fees')->with('data', $data);
        } else if ($x = "Grades") {
            $data = Grade::all();
            return view('livewire.show-grades')->with('data', $data);
        } else if ($x = "Injuries") {
            $data = Injury::all();
            return view('livewire.show-injuries')->with('data', $data);
        } else if ($x = "Payments") {
            $data = Payment::all();
            return view('livewire.show-payments')->with('data', $data);
        } else if ($x = "Reports") {
            $data = Subject::all();
            return view('livewire.show-reports')->with('data', $data);
        } else if ($x = "Subjects") {
            $data = TimeTable::all();
            return view('livewire.show-subjects')->with('data', $data);
        } else if ($x = "TimeTables") {
            $data = User::all();
            return view('livewire.show-time-tables')->with('data', $data);
        } else if ($x = "Users") {
            $data = User::all();
            return view('livewire.show-users')->with('data', $data);
        } else {
            $data = User::all();
            return view('livewire.show-users')->with('data', $data);
        }
    }
}

Activity icon

Started a new Conversation Livewire Component Not Found

Hi, I am trying to do something here which am not sure if am going the right way about.

Component [show-admins] class not found: [App\Http\Livewire\ShowAdmins] 

ShowAdmins

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use App\Models\Fee;
use App\Models\Grade;
use App\Models\Injury;
use App\Models\Payment;
use App\Models\Report;
use App\Models\Subject;
use App\Models\TimeTable;
use App\Models\User;

class Admin extends Component
{
    private $x;
    private $data;
    

    private function Fee() {
        $this->data = Fee::all();
    }

    private function Grade() {
        $x = "Grades";
    }

    private function Injury() {
        $x = "Injuries";
    }

    private function Payment() {
        $x = "Payments";
    }

    private function Report() {
        $x = "Grades";
    }

    private function Subject() {
        $x = "Subjects";
    }

    private function TimeTable() {
        $x = "TimeTables";
    }

    private function User() {
        $x = "Users";
    }

    public function render()
    {
        if ($x = "Fees") {
            return view('livewire.fee');
        } else if ($x = "Grades") {
            return view('livewire.grade');
        } else if ($x = "Injuries") {
            return view('livewire.injury');
        } else if ($x = "Payments") {
            return view('livewire.payment');
        } else if ($x = "Reports") {
            return view('livewire.report');
        } else if ($x = "Subjects") {
            return view('livewire.subject');
        } else if ($x = "TimeTables") {
            return view('livewire.timetable');
        } else if ($x = "Users") {
            $data = User::all();
            return view('livewire.users')->with('data', $data);
        } else {
            $data = User::all();
            return view('livewire.users')->with('data', $data);
        }
    }
}
Oct
15
1 week ago
Activity icon

Replied to Diagram Software - Viewing The Project

I got the database diagram, I was just thinking it would be great to see all the connections visually of the whole project.

Oct
14
1 week ago
Activity icon

Started a new Conversation Diagram Software - Viewing The Project

Is there any software which will allow me to overview the whole project. Routes - Controllers - Views etc and to see it as a database diagram.

Activity icon

Replied to Error On Migration Of Database

I have nearly fixed it. If anything I think I need it just so I can get a complete correct automatic Database Diagram.

My original code was riddled with silly errors.

Activity icon

Replied to Error On Migration Of Database

Okay I don't think I need it.

Activity icon

Replied to Error On Migration Of Database

What is the point of the head ache, Ive made websites before with out doing this. What are the plus to doing this.

Activity icon

Replied to Error On Migration Of Database

I organized it back into order, but no avail, I will keep plodding along. I am running into some other errors at the moment, I think I made a complete cock up of the whole affair.

If worse comes to worse I'll make a fresh start with the db.

Activity icon

Replied to Error On Migration Of Database

$table->foreignId('subject_id')->constrained('subjects')->onDelete('cascade');

Its this line of code right here.

<?php

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

class CreateReportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('reports', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained('users')->onDelete('cascade');
            // $table->foreignId('subject_id')->constrained('subjects')->onDelete('cascade');
            $table->string('description');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('reports');
    }
}
Oct
13
2 weeks ago
Activity icon

Started a new Conversation Error On Migration Of Database

I am sorry since I just posted recently, I was too quick to click best answer. I fault I will not make again.

Now it seems I do not have a problem any more with the seeder but with the migration.

SQLSTATE[HY000]: General error: 1824 Failed to open the referenced table 'subjects' (SQL: alter table `reports` add constraint `reports_subject_id_foreign` foreign key (`subject_id`) references `subjects` (`id`) on delete cascade)
<?php

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

class CreateSubjectsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('subjects', function (Blueprint $table) {
            $table->id();
            $table->string('title');
            $table->string('description');
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('subjects');
    }
}
<?php

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

class CreateReportsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('reports', function (Blueprint $table) {
            $table->id();
            $table->foreignId('student_id')->constrained('users')->onDelete('cascade');
            $table->foreignId('subject_id')->constrained('subjects')->onDelete('cascade');
            $table->string('description');
            $table->timestamps();
        });
    }

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

Activity icon

Replied to Migration Foreign Key Error

Working, thank you.

Activity icon

Replied to Migration Foreign Key Error

I am getting the same error when I turn on Seeding.

Activity icon

Replied to Migration Foreign Key Error

Okay, it works just as long as I don't seed.

Yes yes, I see the problem now.

Edit: When I turn on the seeds it won't allow, the users is above as a seed.

        \App\Models\User::factory(20)->create();
        \App\Models\Fee::factory(20)->create();
        \App\Models\Grade::factory(5)->create();
        \App\Models\Injury::factory(30)->create();
        \App\Models\Payment::factory(15)->create();
        \App\Models\Report::factory(30)->create();
        \App\Models\Subject::factory(5)->create();
        \App\Models\TimeTable::factory(20)->create();
Activity icon

Replied to Migration Foreign Key Error

Dropped all tables successfully.
Migration table created successfully.
Migrating: 2014_10_12_000000_create_users_table
Migrated:  2014_10_12_000000_create_users_table (123.32ms)
Migrating: 2014_10_12_100000_create_password_resets_table
Migrated:  2014_10_12_100000_create_password_resets_table (81.87ms)
Migrating: 2019_08_19_000000_create_failed_jobs_table
Migrated:  2019_08_19_000000_create_failed_jobs_table (101.33ms)
Migrating: 2020_10_10_204425_create_permission_tables
Migrated:  2020_10_10_204425_create_permission_tables (1,656.44ms)
Migrating: 2020_10_11_080944_create_injuries_table
Migrated:  2020_10_11_080944_create_injuries_table (232.58ms)
Migrating: 2020_10_11_080959_create_payments_table
Migrated:  2020_10_11_080959_create_payments_table (59.41ms)
Migrating: 2020_10_11_081006_create_reports_table
Migrated:  2020_10_11_081006_create_reports_table (56.84ms)
Migrating: 2020_10_11_081015_create_fees_table
Migrated:  2020_10_11_081015_create_fees_table (78.01ms)
Migrating: 2020_10_11_081022_create_grades_table
Migrated:  2020_10_11_081022_create_grades_table (57.43ms)
Migrating: 2020_10_11_081029_create_time_tables_table
Migrated:  2020_10_11_081029_create_time_tables_table (77.89ms)
Migrating: 2020_10_11_081118_create_subjects_table
Migrated:  2020_10_11_081118_create_subjects_table (77.86ms)
Activity icon

Started a new Conversation Migration Foreign Key Error

    public function up()
    {
        Schema::create('injuries', function (Blueprint $table) {
            $table->id();
            $table->foreignId('user_id')->constrained('users')->onDelete('cascade');
            $table->String('description');
            $table->timestamps();
            
        });
    }

SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (`school`.`injuries`, CONSTRAINT `injuries_user_id_foreign` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`) ON DELETE CASCADE) (SQL: insert into `injuries` (`user_id`, `description`, `updated_at`, `created_at`) values (6, quia, 2020-10-13 15:47:11, 2020-10-13 15:47:11))
Oct
11
2 weeks ago
Activity icon

Replied to Dashhboard Design Discussion

You've never steered me wrong yet.

Activity icon

Started a new Conversation Dashhboard Design Discussion

I have a dashboard and I am wanting to use livewire. I am thinking that I could just have one page, fill the page with everything, all pages. Then use Permissions and Roles, and I think the @can statement within blade to easily just have what the user needs to be displayed. This would completely bypass controllers, since a livewire controller will be handling the business.

Is this a good design. Can you see any future problems with what I have mentioned.

Oct
10
2 weeks ago
Activity icon

Replied to MYSQL Table Already Exists.

Yes! Solved!

            $table->unsignedBigInteger('id');
$table->increments('id');

On the roles and permissions tables.

Activity icon

Replied to MYSQL Table Already Exists.

<?php

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

class CreateUsersTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password');
     
            $table->string('avatar')->nullable();
            $table->string('provider', 20)->nullable();
            $table->string('provider_id')->nullable();
            $table->string('access_token')->nullable();
            $table->date('email_verified_at')->nullable();
     
            $table->rememberToken();
            $table->timestamps();
        });
    }

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

When I do change it I get to id() I get.

 SQLSTATE[HY000]: General error: 1822 Failed to add the foreign key constraint. Missing index for constraint 'users_permissions_permission_id_foreign' in the referenced table 'permissions' (SQL: alter table `users_permissions` add constraint `users_permissions_permission_id_foreign` foreign key (`permission_id`) references `permissions` (`id`) on delete cascade)
Activity icon

Replied to MYSQL Table Already Exists.

Migrate:fresh

SQLSTATE[HY000]: General error: 3780 Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'users_permissions_user_id_foreign' are incompatible. (SQL: alter table `users_permissions` add constraint `users_permissions_user_id_foreign` foreign key (`user_id`) references `users` (`id`) on delete cascade)
Activity icon

Replied to MYSQL Table Already Exists.

Now am getting this error.

I tried rolling back and recreating but no avail.

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'users_permissions' already exists (SQL: create table `users_permissions` (`user_id` bigint unsigned not null, `permission_id` bigint unsigned not null) default character set utf8mb4 collate 'utf8mb4_unicode_ci')
Activity icon

Replied to MYSQL Table Already Exists.

User Permissions Table

<?php

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

class CreateUsersPermissionsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('users_permissions', function (Blueprint $table) {
            $table->bigInteger('user_id');
            $table->bigInteger('permission_id');

            $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
            $table->foreign('permission_id')->references('id')->on('permissions')->onDelete('cascade');

            $table->primary(['user_id','permission_id']);
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('users_permissions');
    }
}
Activity icon

Started a new Conversation MYSQL Table Already Exists.

Help!

General error: 3780 Referencing column 'user_id' and referenced column 'id' in foreign key constraint 'users_permissions_user_id_foreign' are incompatible. (SQL: alter table `users_permissions` add constraint `users_permissions_user_id_foreign` foreign key (`user_id`) references `users` (`id`) on delete cascade)
https://www.larashout.com/laravel-roles-and-permissions
php artisan migrate
Oct
08
2 weeks ago
Activity icon

Started a new Conversation Laratrust Migrate:Fresh --seed Problem

I have implemented Laratrust into my application and I have fixed some issues which was due to my own mistakes. I want a fresh start with the database by typing the command of migrate:fresh --seed, but I am getting this problem, which I feel like I shouldn't be seeing since all tables should be dropped.

Base table or view already exists: 1050 Table 'roles' already exists

Oct
06
3 weeks ago
Activity icon

Started a new Conversation Design Decisions - Which Is The Best

A. Having multiple users tables - Admin, Teacher, Parent, Student, and having the same for other tables, Admin-Attendance, Teacher-Attendance, Parent-Attendance, Student-Attendance.

B. Having one users table with access rights column, Admin, Teacher, Parent, Student, and having one Attendance table with Access-right. So I can easily sort.

Or any other way of doing it would be happily accepted into consideration.

Activity icon

Replied to Livewire Removing Component

ah, I managed it. I went about it the wrong way. Was much easier to just have one component and change as such.


<?php

namespace App\Http\Livewire;

use Livewire\Component;

class Attendances extends Component
{
    private $data;

    public function __construct() {
        $this->name = $this->admin();
    }

    public function admin()
    {
        //$this->data = Attendance::all();
        $this->data = "admin data";
    }

    public function teacher()
    {
        $this->data = "teacher data";
    }

    public function parent()
    {
        $this->data = "parent data";
    }

    public function student()
    {
        $this->data = "student data";
    }

    public function render()
    {
        return view('livewire.attendances')->with('data', $this->data);
    }
}

Activity icon

Started a new Conversation Livewire Removing Component

Hi, I am trying to do a simple thing of when the user clicks a button one component will disappear and another component will appear.

I created all the difference components and have it laid out as such.

          <livewire:teacher-attendance>
          <livewire:parent-attendance>
          <livewire:student-attendance>
          <livewire:admin-attendance>
Oct
05
3 weeks ago
Activity icon

Replied to Livewire Problem

It was

student-attendances

am guessing it going from the blade name. ty

Activity icon

Started a new Conversation Livewire Problem

I keep getting an error message of

Unable to find component: [studentattendances]

main view

<livewire:studentattendances>

controller

<?php

namespace App\Http\Livewire;

use Livewire\Component;
use App\Models\Attendance;

class StudentAttendances extends Component
{
    public function render()
    {
        $this->student_attendances=Attendance::all();
        return view('livewire.student-attendances')->with('student_attendances', $this->student_attendances);
    }
}

livewire view

<div>

    <!-- Admin -->

    <div class="row">

        <!-- Area Chart -->
        <div class="col-xl-12 col-lg-12">
            <div class="card shadow mb-4">
            <!-- Card Header - Dropdown -->
            <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                <h6 class="m-0 font-weight-bold text-primary">Student Attendances</h6>
                <div class="dropdown no-arrow">
                <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                    <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                </a>
                <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                    <div class="dropdown-header">Dropdown Header:</div>
                    <a class="dropdown-item" href="#">Action</a>
                    <a class="dropdown-item" href="#">Another action</a>
                    <div class="dropdown-divider"></div>
                    <a class="dropdown-item" href="#">Something else here</a>
                </div>
                </div>
            </div>
            <!-- Card Body -->
            <div class="card-body">
            <table class="table">
                <thead>
                    <tr>
                    <th scope="col">#</th>
                    <th scope="col">First</th>
                    <th scope="col">Last</th>
                    <th scope="col"></th>
                    </tr>
                </thead>
                <tbody>
                    <tr>
                    <th scope="row">1</th>
                    <td>Mark</td>
                    <td>Otto</td>
                    <td>
                        <div class="dropdown no-arrow float-right">
                        <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                            <div class="dropdown-header">Dropdown Header:</div>
                            <a class="dropdown-item" href="#">Action</a>
                            <a class="dropdown-item" href="#">Another action</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#">Something else here</a>
                        </div>
                        </div>
                    </td>
                    </tr>
                    <tr>
                    <th scope="row">2</th>
                    <td>Jacob</td>
                    <td>Thornton</td>
                    <td>
                        <div class="dropdown no-arrow float-right">
                        <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                            <div class="dropdown-header">Dropdown Header:</div>
                            <a class="dropdown-item" href="#">Action</a>
                            <a class="dropdown-item" href="#">Another action</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#">Something else here</a>
                        </div>
                        </div>          
                    </td>
                    </tr>
                    <tr>
                    <th scope="row">3</th>
                    <td>Larry</td>
                    <td>the Bird</td>
                    <td>
                        <div class="dropdown no-arrow float-right">
                        <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                            <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                        </a>
                        <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                            <div class="dropdown-header">Dropdown Header:</div>
                            <a class="dropdown-item" href="#">Action</a>
                            <a class="dropdown-item" href="#">Another action</a>
                            <div class="dropdown-divider"></div>
                            <a class="dropdown-item" href="#">Something else here</a>
                        </div>
                        </div>
                    </td>
                    </tr>
                </tbody>
                </table>
            </div>
            </div>
        </div>
    </div>

</div>

Oct
04
3 weeks ago
Activity icon

Replied to Livewire Not Deincrementing

Now it's working and I have no idea why.

Activity icon

Replied to Livewire Not Deincrementing

No, its just that the increment keep going up, even when I press the negative button.

Activity icon

Started a new Conversation Livewire Not Deincrementing

<?php

namespace App\Http\Livewire;

use Livewire\Component;

class Counter extends Component
{
    public $count = 0;

    public function increment()
    {
        $this->count++;
    }

    public function deincrement()
    {
        $this->count--;
    }

    public function render()
    {
        return view('livewire.counter');
    }
}
<div style="text-align: center">
    <button wire:click="increment">+</button>
    <h1>{{ $count }}</h1>
    <button wire:click="deincrement">-</button>
</div>
<!DOCTYPE html>
<html lang="{{ str_replace('_', '-', app()->getLocale()) }}">
    <head>
        <meta charset="utf-8">
        <meta name="viewport" content="width=device-width, initial-scale=1">

        <title>Laravel</title>

        <!-- Fonts -->
        <link href="https://fonts.googleapis.com/css2?family=Nunito:[email protected];600;700&display=swap" rel="stylesheet">

        <!-- Bootstrap -->
        <link rel="stylesheet" href="{{asset('css/app.css')}}">

        <style>
            body {
                font-family: 'Nunito';
            }
        </style>

        @livewireStyles
    </head>

    <body>
       <livewire:counter>
            

       @livewireScripts
    </body>
</html>

Oct
03
3 weeks ago
Activity icon

Replied to Interactive Page

Excited.

Activity icon

Replied to Interactive Page

Okay, so I have a dashboard page, I want to make it so information will be grabbed from the database and displayed with out leaving the page, as well as updating of the charts to represent the new data.

Activity icon

Started a new Conversation Interactive Page

I have a Dashboard but I want it interactive in that am not changing page. How would I go about doing this.

Activity icon

Replied to Template Include Not Working

Fixed

@include('../layouts.dashboard-sidebar')
Activity icon

Replied to Template Include Not Working

Ah the whole file looks like this.

@extends('layouts.dashboard')

@section('title', 'English Learning')

@section('content')    

  <!-- Page Wrapper -->
  <div id="wrapper">

    @include('layouts.dashboard-sidebar')

    <!-- Content Wrapper -->
    <div id="content-wrapper" class="d-flex flex-column">

      <!-- Main Content -->
      <div id="content">

        <!-- Topbar -->
        <nav class="navbar navbar-expand navbar-light bg-white topbar mb-4 static-top shadow">

          <!-- Sidebar Toggle (Topbar) -->
          <button id="sidebarToggleTop" class="btn btn-link d-md-none rounded-circle mr-3">
            <i class="fa fa-bars"></i>
          </button>

          <!-- Topbar Search -->
          <form class="d-none d-sm-inline-block form-inline mr-auto ml-md-3 my-2 my-md-0 mw-100 navbar-search">
            <div class="input-group">
              <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
              <div class="input-group-append">
                <button class="btn btn-primary" type="button">
                  <i class="fas fa-search fa-sm"></i>
                </button>
              </div>
            </div>
          </form>

          <!-- Topbar Navbar -->
          <ul class="navbar-nav ml-auto">

            <!-- Nav Item - Search Dropdown (Visible Only XS) -->
            <li class="nav-item dropdown no-arrow d-sm-none">
              <a class="nav-link dropdown-toggle" href="#" id="searchDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-search fa-fw"></i>
              </a>
              <!-- Dropdown - Messages -->
              <div class="dropdown-menu dropdown-menu-right p-3 shadow animated--grow-in" aria-labelledby="searchDropdown">
                <form class="form-inline mr-auto w-100 navbar-search">
                  <div class="input-group">
                    <input type="text" class="form-control bg-light border-0 small" placeholder="Search for..." aria-label="Search" aria-describedby="basic-addon2">
                    <div class="input-group-append">
                      <button class="btn btn-primary" type="button">
                        <i class="fas fa-search fa-sm"></i>
                      </button>
                    </div>
                  </div>
                </form>
              </div>
            </li>

            <!-- Nav Item - Alerts -->
            <li class="nav-item dropdown no-arrow mx-1">
              <a class="nav-link dropdown-toggle" href="#" id="alertsDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-bell fa-fw"></i>
                <!-- Counter - Alerts -->
                <span class="badge badge-danger badge-counter">3+</span>
              </a>
              <!-- Dropdown - Alerts -->
              <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="alertsDropdown">
                <h6 class="dropdown-header">
                  Alerts Center
                </h6>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-primary">
                      <i class="fas fa-file-alt text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">December 12, 2019</div>
                    <span class="font-weight-bold">A new monthly report is ready to download!</span>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-success">
                      <i class="fas fa-donate text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">December 7, 2019</div>
                    0.29 has been deposited into your account!
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="mr-3">
                    <div class="icon-circle bg-warning">
                      <i class="fas fa-exclamation-triangle text-white"></i>
                    </div>
                  </div>
                  <div>
                    <div class="small text-gray-500">December 2, 2019</div>
                    Spending Alert: We've noticed unusually high spending for your account.
                  </div>
                </a>
                <a class="dropdown-item text-center small text-gray-500" href="#">Show All Alerts</a>
              </div>
            </li>

            <!-- Nav Item - Messages -->
            <li class="nav-item dropdown no-arrow mx-1">
              <a class="nav-link dropdown-toggle" href="#" id="messagesDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <i class="fas fa-envelope fa-fw"></i>
                <!-- Counter - Messages -->
                <span class="badge badge-danger badge-counter">7</span>
              </a>
              <!-- Dropdown - Messages -->
              <div class="dropdown-list dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="messagesDropdown">
                <h6 class="dropdown-header">
                  Message Center
                </h6>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/fn_BT9fwg_E/60x60" alt="">
                    <div class="status-indicator bg-success"></div>
                  </div>
                  <div class="font-weight-bold">
                    <div class="text-truncate">Hi there! I am wondering if you can help me with a problem I've been having.</div>
                    <div class="small text-gray-500">Emily Fowler · 58m</div>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/AU4VPcFN4LE/60x60" alt="">
                    <div class="status-indicator"></div>
                  </div>
                  <div>
                    <div class="text-truncate">I have the photos that you ordered last month, how would you like them sent to you?</div>
                    <div class="small text-gray-500">Jae Chun · 1d</div>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/CS2uCrpNzJY/60x60" alt="">
                    <div class="status-indicator bg-warning"></div>
                  </div>
                  <div>
                    <div class="text-truncate">Last month's report looks great, I am very happy with the progress so far, keep up the good work!</div>
                    <div class="small text-gray-500">Morgan Alvarez · 2d</div>
                  </div>
                </a>
                <a class="dropdown-item d-flex align-items-center" href="#">
                  <div class="dropdown-list-image mr-3">
                    <img class="rounded-circle" src="https://source.unsplash.com/Mv9hjnEUHR4/60x60" alt="">
                    <div class="status-indicator bg-success"></div>
                  </div>
                  <div>
                    <div class="text-truncate">Am I a good boy? The reason I ask is because someone told me that people say this to all dogs, even if they aren't good...</div>
                    <div class="small text-gray-500">Chicken the Dog · 2w</div>
                  </div>
                </a>
                <a class="dropdown-item text-center small text-gray-500" href="#">Read More Messages</a>
              </div>
            </li>

            <div class="topbar-divider d-none d-sm-block"></div>

            <!-- Nav Item - User Information -->
            <li class="nav-item dropdown no-arrow">
              <a class="nav-link dropdown-toggle" href="#" id="userDropdown" role="button" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                <span class="mr-2 d-none d-lg-inline text-gray-600 small">Valerie Luna</span>
                <img class="img-profile rounded-circle" src="https://source.unsplash.com/QAB-WJcbgJk/60x60">
              </a>
              <!-- Dropdown - User Information -->
              <div class="dropdown-menu dropdown-menu-right shadow animated--grow-in" aria-labelledby="userDropdown">
                <a class="dropdown-item" href="#">
                  <i class="fas fa-user fa-sm fa-fw mr-2 text-gray-400"></i>
                  Profile
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-cogs fa-sm fa-fw mr-2 text-gray-400"></i>
                  Settings
                </a>
                <a class="dropdown-item" href="#">
                  <i class="fas fa-list fa-sm fa-fw mr-2 text-gray-400"></i>
                  Activity Log
                </a>
                <div class="dropdown-divider"></div>
                <a class="dropdown-item" href="#" data-toggle="modal" data-target="#logoutModal">
                  <i class="fas fa-sign-out-alt fa-sm fa-fw mr-2 text-gray-400"></i>
                  Logout
                </a>
              </div>
            </li>

          </ul>

        </nav>
        <!-- End of Topbar -->

        <!-- Begin Page Content -->
        <div class="container-fluid">

          <!-- Page Heading -->
          <div class="d-sm-flex align-items-center justify-content-between mb-4">
            <h1 class="h3 mb-0 text-gray-800">Dashboard</h1>
            <a href="#" class="d-none d-sm-inline-block btn btn-sm btn-primary shadow-sm"><i class="fas fa-download fa-sm text-white-50"></i> Generate Report</a>
          </div>

          <!-- Content Row -->
          <div class="row">

            <!-- Earnings (Monthly) Card Example -->
            <div class="col-xl-3 col-md-6 mb-4">
              <div class="card border-left-primary shadow h-100 py-2">
                <div class="card-body">
                  <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                      <div class="text-xs font-weight-bold text-primary text-uppercase mb-1">Earnings (Monthly)</div>
                      <div class="h5 mb-0 font-weight-bold text-gray-800">,000</div>
                    </div>
                    <div class="col-auto">
                      <i class="fas fa-calendar fa-2x text-gray-300"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <!-- Earnings (Monthly) Card Example -->
            <div class="col-xl-3 col-md-6 mb-4">
              <div class="card border-left-success shadow h-100 py-2">
                <div class="card-body">
                  <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                      <div class="text-xs font-weight-bold text-success text-uppercase mb-1">Earnings (Annual)</div>
                      <div class="h5 mb-0 font-weight-bold text-gray-800">5,000</div>
                    </div>
                    <div class="col-auto">
                      <i class="fas fa-dollar-sign fa-2x text-gray-300"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <!-- Earnings (Monthly) Card Example -->
            <div class="col-xl-3 col-md-6 mb-4">
              <div class="card border-left-info shadow h-100 py-2">
                <div class="card-body">
                  <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                      <div class="text-xs font-weight-bold text-info text-uppercase mb-1">Tasks</div>
                      <div class="row no-gutters align-items-center">
                        <div class="col-auto">
                          <div class="h5 mb-0 mr-3 font-weight-bold text-gray-800">50%</div>
                        </div>
                        <div class="col">
                          <div class="progress progress-sm mr-2">
                            <div class="progress-bar bg-info" role="progressbar" style="width: 50%" aria-valuenow="50" aria-valuemin="0" aria-valuemax="100"></div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <div class="col-auto">
                      <i class="fas fa-clipboard-list fa-2x text-gray-300"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>

            <!-- Pending Requests Card Example -->
            <div class="col-xl-3 col-md-6 mb-4">
              <div class="card border-left-warning shadow h-100 py-2">
                <div class="card-body">
                  <div class="row no-gutters align-items-center">
                    <div class="col mr-2">
                      <div class="text-xs font-weight-bold text-warning text-uppercase mb-1">Pending Requests</div>
                      <div class="h5 mb-0 font-weight-bold text-gray-800">18</div>
                    </div>
                    <div class="col-auto">
                      <i class="fas fa-comments fa-2x text-gray-300"></i>
                    </div>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <!-- Content Row -->

          <div class="row">

            <!-- Area Chart -->
            <div class="col-xl-8 col-lg-7">
              <div class="card shadow mb-4">
                <!-- Card Header - Dropdown -->
                <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                  <h6 class="m-0 font-weight-bold text-primary">Earnings Overview</h6>
                  <div class="dropdown no-arrow">
                    <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                      <div class="dropdown-header">Dropdown Header:</div>
                      <a class="dropdown-item" href="#">Action</a>
                      <a class="dropdown-item" href="#">Another action</a>
                      <div class="dropdown-divider"></div>
                      <a class="dropdown-item" href="#">Something else here</a>
                    </div>
                  </div>
                </div>
                <!-- Card Body -->
                <div class="card-body">
                  <div class="chart-area">
                    <canvas id="myAreaChart"></canvas>
                  </div>
                </div>
              </div>
            </div>

            <!-- Pie Chart -->
            <div class="col-xl-4 col-lg-5">
              <div class="card shadow mb-4">
                <!-- Card Header - Dropdown -->
                <div class="card-header py-3 d-flex flex-row align-items-center justify-content-between">
                  <h6 class="m-0 font-weight-bold text-primary">Revenue Sources</h6>
                  <div class="dropdown no-arrow">
                    <a class="dropdown-toggle" href="#" role="button" id="dropdownMenuLink" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
                      <i class="fas fa-ellipsis-v fa-sm fa-fw text-gray-400"></i>
                    </a>
                    <div class="dropdown-menu dropdown-menu-right shadow animated--fade-in" aria-labelledby="dropdownMenuLink">
                      <div class="dropdown-header">Dropdown Header:</div>
                      <a class="dropdown-item" href="#">Action</a>
                      <a class="dropdown-item" href="#">Another action</a>
                      <div class="dropdown-divider"></div>
                      <a class="dropdown-item" href="#">Something else here</a>
                    </div>
                  </div>
                </div>
                <!-- Card Body -->
                <div class="card-body">
                  <div class="chart-pie pt-4 pb-2">
                    <canvas id="myPieChart"></canvas>
                  </div>
                  <div class="mt-4 text-center small">
                    <span class="mr-2">
                      <i class="fas fa-circle text-primary"></i> Direct
                    </span>
                    <span class="mr-2">
                      <i class="fas fa-circle text-success"></i> Social
                    </span>
                    <span class="mr-2">
                      <i class="fas fa-circle text-info"></i> Referral
                    </span>
                  </div>
                </div>
              </div>
            </div>
          </div>

          <!-- Content Row -->
          <div class="row">

            <!-- Content Column -->
            <div class="col-lg-6 mb-4">

              <!-- Project Card Example -->
              <div class="card shadow mb-4">
                <div class="card-header py-3">
                  <h6 class="m-0 font-weight-bold text-primary">Projects</h6>
                </div>
                <div class="card-body">
                  <h4 class="small font-weight-bold">Server Migration <span class="float-right">20%</span></h4>
                  <div class="progress mb-4">
                    <div class="progress-bar bg-danger" role="progressbar" style="width: 20%" aria-valuenow="20" aria-valuemin="0" aria-valuemax="100"></div>
                  </div>
                  <h4 class="small font-weight-bold">Sales Tracking <span class="float-right">40%</span></h4>
                  <div class="progress mb-4">
                    <div class="progress-bar bg-warning" role="progressbar" style="width: 40%" aria-valuenow="40" aria-valuemin="0" aria-valuemax="100"></div>
                  </div>
                  <h4 class="small font-weight-bold">Customer Database <span class="float-right">60%</span></h4>
                  <div class="progress mb-4">
                    <div class="progress-bar" role="progressbar" style="width: 60%" aria-valuenow="60" aria-valuemin="0" aria-valuemax="100"></div>
                  </div>
                  <h4 class="small font-weight-bold">Payout Details <span class="float-right">80%</span></h4>
                  <div class="progress mb-4">
                    <div class="progress-bar bg-info" role="progressbar" style="width: 80%" aria-valuenow="80" aria-valuemin="0" aria-valuemax="100"></div>
                  </div>
                  <h4 class="small font-weight-bold">Account Setup <span class="float-right">Complete!</span></h4>
                  <div class="progress">
                    <div class="progress-bar bg-success" role="progressbar" style="width: 100%" aria-valuenow="100" aria-valuemin="0" aria-valuemax="100"></div>
                  </div>
                </div>
              </div>

              <!-- Color System -->
              <div class="row">
                <div class="col-lg-6 mb-4">
                  <div class="card bg-primary text-white shadow">
                    <div class="card-body">
                      Primary
                      <div class="text-white-50 small">#4e73df</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-success text-white shadow">
                    <div class="card-body">
                      Success
                      <div class="text-white-50 small">#1cc88a</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-info text-white shadow">
                    <div class="card-body">
                      Info
                      <div class="text-white-50 small">#36b9cc</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-warning text-white shadow">
                    <div class="card-body">
                      Warning
                      <div class="text-white-50 small">#f6c23e</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-danger text-white shadow">
                    <div class="card-body">
                      Danger
                      <div class="text-white-50 small">#e74a3b</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-secondary text-white shadow">
                    <div class="card-body">
                      Secondary
                      <div class="text-white-50 small">#858796</div>
                    </div>
                  </div>
                </div>
                <div class="col-lg-6 mb-4">
                  <div class="card bg-light text-black shadow">
                    <div class="card-body">
                      Light
                      <div class="text-black-50 small">#f8f9fc</div>
                    </div>
                  </div>
              </div>
              <div class="col-lg-6 mb-4">
                <div class="card bg-dark text-white shadow">
                  <div class="card-body">
                      Dark
                      <div class="text-white-50 small">#5a5c69</div>
                  </div>
                </div>
              </div>
            </div>

            </div>

            <div class="col-lg-6 mb-4">

              <!-- Illustrations -->
              <div class="card shadow mb-4">
                <div class="card-header py-3">
                  <h6 class="m-0 font-weight-bold text-primary">Illustrations</h6>
                </div>
                <div class="card-body">
                  <div class="text-center">
                    <img class="img-fluid px-3 px-sm-4 mt-3 mb-4" style="width: 25rem;" src="img/undraw_posting_photo.svg" alt="">
                  </div>
                  <p>Add some quality, svg illustrations to your project courtesy of <a target="_blank" rel="nofollow" href="https://undraw.co/">unDraw</a>, a constantly updated collection of beautiful svg images that you can use completely free and without attribution!</p>
                  <a target="_blank" rel="nofollow" href="https://undraw.co/">Browse Illustrations on unDraw &rarr;</a>
                </div>
              </div>

              <!-- Approach -->
              <div class="card shadow mb-4">
                <div class="card-header py-3">
                  <h6 class="m-0 font-weight-bold text-primary">Development Approach</h6>
                </div>
                <div class="card-body">
                  <p>SB Admin 2 makes extensive use of Bootstrap 4 utility classes in order to reduce CSS bloat and poor page performance. Custom CSS classes are used to create custom components and custom utility classes.</p>
                  <p class="mb-0">Before working with this theme, you should become familiar with the Bootstrap framework, especially the utility classes.</p>
                </div>
              </div>

            </div>
          </div>

        </div>
        <!-- /.container-fluid -->

      </div>
      <!-- End of Main Content -->

      <!-- Footer -->
      <footer class="sticky-footer bg-white">
        <div class="container my-auto">
          <div class="copyright text-center my-auto">
            <span>Copyright &copy; Your Website 2020</span>
          </div>
        </div>
      </footer>
      <!-- End of Footer -->

    </div>
    <!-- End of Content Wrapper -->

  </div>
  <!-- End of Page Wrapper -->

  <!-- Scroll to Top Button-->
  <a class="scroll-to-top rounded" href="#page-top">
    <i class="fas fa-angle-up"></i>
  </a>

  <!-- Logout Modal-->
  <div class="modal fade" id="logoutModal" tabindex="-1" role="dialog" aria-labelledby="exampleModalLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
      <div class="modal-content">
        <div class="modal-header">
          <h5 class="modal-title" id="exampleModalLabel">Ready to Leave?</h5>
          <button class="close" type="button" data-dismiss="modal" aria-label="Close">
            <span aria-hidden="true">×</span>
          </button>
        </div>
        <div class="modal-body">Select "Logout" below if you are ready to end your current session.</div>
        <div class="modal-footer">
          <button class="btn btn-secondary" type="button" data-dismiss="modal">Cancel</button>
          <a class="btn btn-primary" href="#" data-toggle="modal" data-target="#logoutModal" href="{{ route('logout') }}"
            onclick="event.preventDefault();
                          document.getElementById('logout-form').submit();">
            {{ __('Logout') }}
          </a>
          <form id="logout-form" action="{{ route('logout') }}" method="POST" style="display: none;">
              @csrf
          </form>
        </div>
      </div>
    </div>
  </div>

@endsection 
Activity icon

Started a new Conversation Template Include Not Working

I want to include a side bar from another file but it doesn't seems to be working as expected.

view

@extends('layouts.dashboard')

@section('title', 'English Learning')

@section('content')    

  <!-- Page Wrapper -->
  <div id="wrapper">

    @include('layouts.dashboard-sidebar')
resources\views\home.blade.php
resources\views\layouts\dashboard-sidebar.blade.php
Sep
29
4 weeks ago
Activity icon

Replied to Login Route Broken

No, it is when I am logging in.

Activity icon

Replied to Login Route Broken

Route [dashboard-index] not defined. (View: C:\Users\Josh\Desktop\Projects\laravel-org\resources\views\home.blade.php) 

I am still getting it...

f-it I just changed the name of the route.

So confused right now.

Activity icon

Started a new Conversation Login Route Broken

I had an old file which became broken, so I created a new laravel file and copied everything across.

Now I am getting this error every time I login, but it's strange because I never changed the auth files.

Route [dashboard-index] not defined. (View: C:\Users\Josh\Desktop\Projects\laravel-org\resources\views\home.blade.php)

I need it to goto

Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])->name('home');

But I have no idea where to change it.

Sep
28
4 weeks ago
Activity icon

Started a new Conversation Multi Auth Or Roles And Permissions

When creating a login system which is the best route to take.

Activity icon

Started a new Conversation Accidently Deleted My Users Migration

Hey I deleted my Users Migration table - how do I get it back.

Thank you in advance.

Sep
20
1 month ago
Activity icon

Started a new Conversation Route Not Defined. How Do I Do This?

You can probably guess what it is I am trying to do. Because I want to use dashboard-index multiple times but under different users.

Route [student.dashboard-index] not defined. (View: C:\Users\Josh\Desktop\Projects\School App\school project auth\resources\views\auth\login.blade.php) 
// Student Dashboard
Route::namespace('Frontend\Student\Dashboard')->name('student')->group(function () {
    Route::get('dashboard-index', '[email protected]')->name('dashboard-index');
});
<a href="{{ route('student.dashboard-index') }}" class="btn btn-primary btn-user btn-block">
                      Login
                    </a>
Sep
13
1 month ago
Activity icon

Replied to Routes Error! View [[email protected]] Not Found.

I knew would be something dumb I missed.

Activity icon

Started a new Conversation Routes Error! View [[email protected]] Not Found.

Folder structure:

app\Http\Controllers\Backend\Dashboard\PagesController.php

View Structure:

resources\views\backend\dashboard\index.blade.php
Route::namespace('Backend.Dashboard')->group(function () {
    Route::view('dashboard-index', '[email protected]')->name('dashboard-index');
});
<?php

namespace App\Http\Controllers\Backend\Dashboard;

use App\Http\Controllers\Controller;
use Illuminate\Http\Request;

class PagesController extends Controller
{
    /**
     * Show the application dashboard.
     *
     * @return \Illuminate\Contracts\Support\Renderable
     */
    public function index()
    {
        return "Hello world!";
    }
}
Aug
15
2 months ago
Activity icon

Replied to PagesController Not Found!

Ah yes, I see what it is I have done wrong.