David Orizu

Member Since 6 Months Ago

Experience Points
710
Total
Experience

4,290 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
1
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.

  • Community Pillar

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

Level 1
710 XP
May
27
2 weeks ago
Activity icon

Replied to Larvel 8 Delete Modal Not Getting The Right Id

Sorry it's not showing any error in the console but this time around it's not deleting anything

Activity icon

Replied to Larvel 8 Delete Modal Not Getting The Right Id

and when I click on "delete-post/14:1" it took me to another tab showing the Id I think the method is working but it's not redirecting to the page.

Activity icon

Replied to Larvel 8 Delete Modal Not Getting The Right Id

Ok Sir it still didn't work this was the error from my console


delete-post/14:1 Failed to load resource: the server responded with a status of 405 (Method Not Allowed)

Activity icon

Replied to Larvel 8 Delete Modal Not Getting The Right Id

<table class="table table-responsive table-bordered table-striped table-hover">
    <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Description</th>
        <th>Action</th>
    </tr>
   
    @foreach($posters as $poster)
     <tr>
         <td>{{$poster -> id}}</td>
         <td>{{$poster -> name}}</td>
         <td>{{$poster -> description}}</td>
         <td>
             <a href="/edit-post/{{$poster -> id}}" type="button" class="btn btn-success">Edit</a>
             <button onclick="deleteConfirmation({{$poster->id}})" type="button" class="btn btn-danger delete-confirm offset-md-2">Delete</button>
         </td>
     </tr>
    @endforeach
</table>

<script type="text/javascript">
    function deleteConfirmation(id) {
        swal({
            title: "Delete?",
            text: "Are you sure you want to delete this?",
            type: "warning",
            showCancelButton: !0,
            confirmButtonText: "Yes, delete it!",
            cancelButtonText: "No, cancel!",
            reverseButtons: !0
        }).then(function (e) {

            if (e.value === true) {
                var CSRF_TOKEN = $('meta[name="csrf-token"]').attr('content');

                $.ajax({
                    type: 'POST',
                    url: "{{url('/delete-post')}}/" + id,
                    data: {_token: CSRF_TOKEN},
                    dataType: 'JSON',
                    success: function (results) {

                        if (results.success === true) {
                            swal("Done!", results.message, "success");
                        } else {
                            swal("Error!", results.message, "error");
                        }
                    }
                });

            } else {
                e.dismiss;
            }

        }, function (dismiss) {
            return false;
        })
    }
</script>

my controller

public function deletepost($id)
    {
         dd($id);
         DB::table('posters')->where('id', $id)->delete();
         return back()-> with('post_add', 'Post deleted Successfully');
    }

and my route

Route::get ("/delete-post/{id}", [PosterController::class, "deletepost"])->name("poster.delete");

Please I need help when I click on "Yes Delete it nothing happens.

Activity icon

Started a new Conversation Larvel 8 Delete Modal Not Getting The Right Id

Hello guys I'm having an issue with my laravel delete modal when I click on it always gives me the last value on my table instead of selecting the id of the one I selected.

Here is my blade.php

<table class="table table-responsive table-bordered table-striped table-hover">
    <tr>
        <th>ID</th>
        <th>Name</th>
        <th>Description</th>
        <th>Action</th>
    </tr>
   
    @foreach($posters as $poster)
     <tr>
         <td>{{$poster -> id}}</td>
         <td>{{$poster -> name}}</td>
         <td>{{$poster -> description}}</td>
         <td>
             <a href="/edit-post/{{$poster -> id}}" type="button" class="btn btn-success">Edit</a>
             <button data-bs-target="#deleteModal" data-bs-posterid="{{$poster -> id}}" data-bs-toggle="modal" type="button" class="btn btn-danger offset-md-2">Delete</button>
         </td>
     </tr>
    @endforeach
</table>

     <!--Delete Modal -->
<div class="modal modal-danger fade" id="deleteModal" tabindex="-1" aria-labelledby="deleteModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <h5 class="modal-title" id="deleteModalLabel">Delete</h5>
        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
      </div>
      <form action="/delete-post/{{$poster -> id}}" method="post">
      @csrf
        @method('DELETE')
      <div class="modal-body">
        <input type="hidden" name="id" id="poster_id" value="{{$poster -> id}}">
        <h5>Are you Sure you want to delete {{$poster -> name}}?</h5>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-primary" data-bs-dismiss="modal">No</button>
        <button type="submit" class="btn btn-danger">Yes, Delete it.</button>
      </div>
      </form>
    </div>
  </div>
</div>
<!-- End Delete Modal -->

<script src="{{asset('js/jquery.min.js')}}"></script>
<script>
    $('#deleteModal').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget)

        var poster_id = button.data('posterid')
        var modal = $(this)

        modal.find('.modal-body#poster_id').val(poster_id);
    })
</script>

and my controller

    public function deletepost($id)
    {
         dd($id);
         DB::table('posters')->where('id', $id)->delete();
         return back()-> with('post_add', 'Post deleted Successfully');
    }

When I click on "Yes Delete it" It always selects the last value on my table which has an id of 20 instead of the id on each one i selected. Please guys I seriously need help.

May
14
4 weeks ago
Activity icon

Started a new Conversation Laravel Timestamps Not Showing In My SQL Database

Hello guys every input on my sql database is working except that my timestamps are not showing

Here is my migrations file

public function up()
    {
        Schema::create('expectings', function (Blueprint $table) {
            $table->id();
            $table->time('time');
            $table->date('day');
            $table->string('name');
            $table->timestamps();
        });
    }

When everything is created in my database my timestamps "created_at" and "updated_at" are all null. So please I'll really be grateful if you guys can help me. Thank you

May
13
4 weeks ago
Activity icon

Replied to ErrorException Array To String Conversion In Controller File

Thank you so much dear you've really been of great assistance to me since I joined laracast I love you so much

Activity icon

Started a new Conversation ErrorException Array To String Conversion In Controller File

Hello please I don't intend on disturbing anyone. As a laravel beginner I'm facing alot of challenges. Please guys I'm having another problem which says "Error Exception Array to string conversion" and this occurs in my Controller.

Here's my controller

 public function expectingpost(Request $request)
    {

        DB::table('expectings') ->insert([

            $validatedData = $request->validate([
                "time" => 'required|date_format:H:i',
                "day" => 'required|date_format:Y-m-d',
                "name" => 'required'
            ]).

            "time" => $request->time,
            "day" => $request->date,
            "name" => $request->name
        ]);

        return back() -> with('expecting', $request->input('name') . ' has been added as your guest');
    }
}

0K please I need responses thank you

Activity icon

Replied to Laravel Validate Time And Date Error

Ok i have tackled this but

 "day" => 'required|date_format:d/m/Y'

seems to be having issues. Sir please I honestiy need your help

Activity icon

Replied to Laravel Validate Time And Date Error

Ok that has been solve but I now have this error "Method Illuminate\Validation\Validator::validateName does not exist." So how can I fix this please

Activity icon

Started a new Conversation Laravel Validate Time And Date Error

Hello guys please I need some help with this laravel error "Method Illuminate\Validation\Validator::validateTime does not exist."

This is my Controller

public function expectingpost(Request $request)
    {

        DB::table('expectings') ->insert([

            $validatedData = $request->validate([
                "time" => 'required|time_format:00:00',
                "day" => 'required|date_format:d/m/Y',
                "name" => 'required|name'
            ]).

            "time" => $request->time,
            "day" => $request->date,
            "name" => $request->name
        ]);

        return back() -> with('expecting', $request->input('name') . ' has been added as your guest');
    }
}

And also my blade.php

<form action="{{route('expecting.post')}}" method="post" class="expecting-form">
              @csrf
              
              @error('time')
                <div class="alert alert-danger" style="width: 100%;">
                   <span>{{$message}}</span>
                </div>
                @enderror
                @error('day')
                 <div class="alert alert-danger" style="width: 100%;">
                   <span>{{$message}}</span>
                   </div>
                @enderror
                @error('name')
                <div class="alert alert-danger" style="width: 100%;">
                   <span>{{$message}}</span>
                   </div>
                @enderror
              <div class="col-md-12">
                <label for="time" class="form-label"><strong>Time of Visit</strong></label>
                <input type="time" class="form-control" name="time" id="time" placeholder="Time of Visit">
              </div>
              <br>
              <div class="col-md-12">
                <label for="date" class="form-label"><strong>Day of Visit</strong></label>
                <input type="date" class="form-control" name="date" id="date" placeholder="Day of Visit">
              </div>
              <br>
              <div class="col-md-12">
                <label for="name" class="form-label"><strong>Name of Person</strong></label>
                <input type="text" class="form-control" id="name" name="name" placeholder="Name of Person">
              </div>
        </div>
        <div class="modal-footer col-11 mx-auto">
          <button type="submit" class="btn btn-confirm text-white"><b>OK</b></button>
        </div>
    </form>

Please I seriously need help. Thank you

Activity icon

Replied to Laravel Column Not Found 1054 Unknown Column

Thank you so much Sir I'm really grateful

May
12
1 month ago
Activity icon

Replied to Laravel Column Not Found 1054 Unknown Column

And also my migrations file

<?php

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

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

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

Started a new Conversation Laravel Column Not Found 1054 Unknown Column

Hello guys please I need help in my laravel 8 project I'm trying to post my form and it's giving me this error

"SQLSTATE[42S22]: Column not found: 1054 Unknown column '0' in 'field list' (SQL: insert into posters (0, 1) values (0, 0))"

Here is my controller

<?php

namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class PosterController extends Controller
{
    public function addpost()
    {
        return view('add-post');
    }

    public function savepost(Request $request)
    {
        DB::table('posters') ->insert([
            "name" == $request->name,
            "description" == $request->description
        ]);

        return back() -> with('post_add', 'Post added Successfully');
    }
}

and Here is my blade.php

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Add Post</title>
    <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet">
</head>
<body>
   <div class="container-fluid">
   <div class="post-area col-md-11 mx-auto">
   <br><h2>Add Post</h2><br>
   @if(Session::has('post_add'))
     <span class="alert alert-success">{{Session::get('post_add')}}</span>
   @endif
    <form method="post" action="{{route('save.post')}}">
    @csrf
       <div class="form-group">
        <label for="name">Post</label>
        <input type="text" class="form-control" id="name" name="name" placeholder="Add your post">
      </div>
        <br>
        <div class="form-group">
        <label for="description">Description</label>
        <textarea type="text" class="form-control" id="description" name="description" placeholder="State Description"></textarea>
        </div>
        <br>
        <div class="form-group">
          <input type="submit" class="btn btn-primary" value="Submit">
        </div>
        </div>
    </form>
    </div>

    <!-- Option 1: Bootstrap Bundle with Popper -->
   <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js"></script>
</body>
</html>

Please I urgently need your help Thank you.

Jan
13
4 months ago
Activity icon

Replied to How Can I Increase Memory Limit Of Laravel Project

Ok I'm new here and I didn't know what I did was wrong OK. Please my friends forgive and understand alright?

Activity icon

Replied to How Can I Increase Memory Limit Of Laravel Project

Please guys don't be offended it worked for me that's why I marked it. Please I'll still be needed your help friends.

Activity icon

Awarded Best Reply on How Can I Increase Memory Limit Of Laravel Project

Thanks guys for your support I ran

composer self-update --2

to upgrade my laravel version to version two then when I ran

composer require laravel/ui

It generated successfully and as I ran

php artisan ui vue --auth

Authentication scaffolding generated successfully. Then I ran

npm install && npm run dev

to compile fresh scaffolding.

Thanks guys so much for your suggestions they were really helpful.

Activity icon

Replied to How Can I Increase Memory Limit Of Laravel Project

Thanks guys for your support I ran

composer self-update --2

to upgrade my laravel version to version two then when I ran

composer require laravel/ui

It generated successfully and as I ran

php artisan ui vue --auth

Authentication scaffolding generated successfully. Then I ran

npm install && npm run dev

to compile fresh scaffolding.

Thanks guys so much for your suggestions they were really helpful.

Activity icon

Started a new Conversation How Can I Increase Memory Limit Of Laravel Project

I am trying to start up login and registeration panel using auth , php artisan make:auth wasn't working so I used

composer require laravel/ui

And this was the result

Using version ^3.2 for laravel/ui
./composer.json has been updated
Loading composer repositories with package information
Updating dependencies (including require-dev)
PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

I later then ran

composer self-update 

which updated successfully but after that, I went back to try

composer require laravel/ui

And it still gave me that memory error. Please guys I seriously need solutions urgently I'm pleading.

Activity icon

Replied to Make Auth

Hello I'm a laravel beginner when I tried

composer require laravel/ui

It showed

PHP Fatal error:  Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223

Fatal error: Allowed memory size of 1610612736 bytes exhausted (tried to allocate 4096 bytes) in phar://C:/ProgramData/ComposerSetup/bin/composer.phar/src/Composer/DependencyResolver/Solver.php on line 223

Check https://getcomposer.org/doc/articles/troubleshooting.md#memory-limit-errors for more info on how to handle out of memory errors.

And I've tried to tackled the issue but no solution any help please ?